Skip to content

Commit

Permalink
Fixed code style with cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelle van Oosterbosch committed Feb 11, 2020
1 parent b2e0777 commit a27f81c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions Serializer/Normalizer/IterableNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* This file is part of the GDPR bundle.
*
* @category Bundle
* @package Gdpr
*
* @author SuperBrave <info@superbrave.nl>
* @copyright 2018 SuperBrave <info@superbrave.nl>
* @license https://github.com/superbrave/gdpr-bundle/blob/master/LICENSE MIT
* @link https://www.superbrave.nl/
*
* @see https://www.superbrave.nl/
*/

namespace Superbrave\GdprBundle\Serializer\Normalizer;
Expand Down Expand Up @@ -40,7 +41,7 @@ public function supportsNormalization($data, $format = null)
/**
* {@inheritdoc}
*/
public function normalize($object, $format = null, array $context = array())
public function normalize($object, $format = null, array $context = [])
{
$normalizedData = [];

Expand Down
5 changes: 2 additions & 3 deletions Tests/Serializer/Normalizer/AnnotationNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace Superbrave\GdprBundle\Tests\Serializer\Normalizer;

use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
Expand Down Expand Up @@ -209,7 +208,7 @@ public function testNormalizeThroughXmlSerializer(): void
$data = new AnnotatedMock(new AnnotatedMock());

$this->assertStringEqualsFile(
__DIR__ . '/../../Resources/xml/annotation_normalizer_result.xml',
__DIR__.'/../../Resources/xml/annotation_normalizer_result.xml',
$serializer->serialize($data, 'xml')
);
}
Expand Down Expand Up @@ -242,7 +241,7 @@ public function testNormalizeThroughJsonSerializer(): void
$data = new AnnotatedMock(new AnnotatedMock());

$this->assertStringEqualsFile(
__DIR__ . '/../../Resources/json/annotation_normalize_result.json',
__DIR__.'/../../Resources/json/annotation_normalize_result.json',
$serializer->serialize($data, 'json')
);
}
Expand Down
15 changes: 8 additions & 7 deletions Tests/Serializer/Normalizer/IterableNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* This file is part of the GDPR bundle.
*
* @category Bundle
* @package Gdpr
*
* @author SuperBrave <info@superbrave.nl>
* @copyright 2018 SuperBrave <info@superbrave.nl>
* @license https://github.com/superbrave/gdpr-bundle/blob/master/LICENSE MIT
* @link https://www.superbrave.nl/
*
* @see https://www.superbrave.nl/
*/

namespace Superbrave\GdprBundle\Tests\Serializer\Normalizer;
Expand Down Expand Up @@ -46,7 +47,7 @@ public function setUp(): void
new DateTimeNormalizer(),
$this->normalizer,
], [
new JsonEncoder()
new JsonEncoder(),
]);

$this->normalizer->setNormalizer($this->serializer);
Expand All @@ -72,7 +73,7 @@ public function testSupportsNormalizationReturnsFalseWhenDataIsNotIterable()
*/
public function testSupportsNormalizationReturnsTrueWhenDataIsIterable()
{
$this->assertTrue($this->normalizer->supportsNormalization(array()));
$this->assertTrue($this->normalizer->supportsNormalization([]));
$this->assertTrue($this->normalizer->supportsNormalization(new ArrayCollection()));
}

Expand Down Expand Up @@ -115,12 +116,12 @@ public function testNormalizeThroughJsonSerializer()
new ArrayCollection([
new \DateTime('2020/01/01'),
new \DateTime('2020/01/01'),
])
]
]),
],
];

$this->assertStringEqualsFile(
__DIR__ . '/../../Resources/json/iterable_normalize_result.json',
__DIR__.'/../../Resources/json/iterable_normalize_result.json',
$this->serializer->serialize($data, 'json')
);
}
Expand Down

0 comments on commit a27f81c

Please sign in to comment.