Skip to content

Commit a27f81c

Browse files
author
Jelle van Oosterbosch
committed
Fixed code style with cs-fixer
1 parent b2e0777 commit a27f81c

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

Serializer/Normalizer/IterableNormalizer.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* This file is part of the GDPR bundle.
44
*
55
* @category Bundle
6-
* @package Gdpr
6+
*
77
* @author SuperBrave <info@superbrave.nl>
88
* @copyright 2018 SuperBrave <info@superbrave.nl>
99
* @license https://github.com/superbrave/gdpr-bundle/blob/master/LICENSE MIT
10-
* @link https://www.superbrave.nl/
10+
*
11+
* @see https://www.superbrave.nl/
1112
*/
1213

1314
namespace Superbrave\GdprBundle\Serializer\Normalizer;
@@ -40,7 +41,7 @@ public function supportsNormalization($data, $format = null)
4041
/**
4142
* {@inheritdoc}
4243
*/
43-
public function normalize($object, $format = null, array $context = array())
44+
public function normalize($object, $format = null, array $context = [])
4445
{
4546
$normalizedData = [];
4647

Tests/Serializer/Normalizer/AnnotationNormalizerTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
namespace Superbrave\GdprBundle\Tests\Serializer\Normalizer;
1515

16-
use Doctrine\Common\Collections\ArrayCollection;
1716
use PHPUnit\Framework\MockObject\MockObject;
1817
use PHPUnit\Framework\TestCase;
1918
use ReflectionClass;
@@ -209,7 +208,7 @@ public function testNormalizeThroughXmlSerializer(): void
209208
$data = new AnnotatedMock(new AnnotatedMock());
210209

211210
$this->assertStringEqualsFile(
212-
__DIR__ . '/../../Resources/xml/annotation_normalizer_result.xml',
211+
__DIR__.'/../../Resources/xml/annotation_normalizer_result.xml',
213212
$serializer->serialize($data, 'xml')
214213
);
215214
}
@@ -242,7 +241,7 @@ public function testNormalizeThroughJsonSerializer(): void
242241
$data = new AnnotatedMock(new AnnotatedMock());
243242

244243
$this->assertStringEqualsFile(
245-
__DIR__ . '/../../Resources/json/annotation_normalize_result.json',
244+
__DIR__.'/../../Resources/json/annotation_normalize_result.json',
246245
$serializer->serialize($data, 'json')
247246
);
248247
}

Tests/Serializer/Normalizer/IterableNormalizerTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* This file is part of the GDPR bundle.
44
*
55
* @category Bundle
6-
* @package Gdpr
6+
*
77
* @author SuperBrave <info@superbrave.nl>
88
* @copyright 2018 SuperBrave <info@superbrave.nl>
99
* @license https://github.com/superbrave/gdpr-bundle/blob/master/LICENSE MIT
10-
* @link https://www.superbrave.nl/
10+
*
11+
* @see https://www.superbrave.nl/
1112
*/
1213

1314
namespace Superbrave\GdprBundle\Tests\Serializer\Normalizer;
@@ -46,7 +47,7 @@ public function setUp(): void
4647
new DateTimeNormalizer(),
4748
$this->normalizer,
4849
], [
49-
new JsonEncoder()
50+
new JsonEncoder(),
5051
]);
5152

5253
$this->normalizer->setNormalizer($this->serializer);
@@ -72,7 +73,7 @@ public function testSupportsNormalizationReturnsFalseWhenDataIsNotIterable()
7273
*/
7374
public function testSupportsNormalizationReturnsTrueWhenDataIsIterable()
7475
{
75-
$this->assertTrue($this->normalizer->supportsNormalization(array()));
76+
$this->assertTrue($this->normalizer->supportsNormalization([]));
7677
$this->assertTrue($this->normalizer->supportsNormalization(new ArrayCollection()));
7778
}
7879

@@ -115,12 +116,12 @@ public function testNormalizeThroughJsonSerializer()
115116
new ArrayCollection([
116117
new \DateTime('2020/01/01'),
117118
new \DateTime('2020/01/01'),
118-
])
119-
]
119+
]),
120+
],
120121
];
121122

122123
$this->assertStringEqualsFile(
123-
__DIR__ . '/../../Resources/json/iterable_normalize_result.json',
124+
__DIR__.'/../../Resources/json/iterable_normalize_result.json',
124125
$this->serializer->serialize($data, 'json')
125126
);
126127
}

0 commit comments

Comments
 (0)