Skip to content

Commit

Permalink
symfony#39102: fabbot again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Basster committed Mar 6, 2021
1 parent a9ab284 commit 52ed5d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
Expand Up @@ -96,7 +96,8 @@ public function setNormalizer(NormalizerInterface $normalizer): void
}
}

public function hasCacheableSupportsMethod(): bool{
public function hasCacheableSupportsMethod(): bool
{
if ($this->delegate instanceof CacheableSupportsMethodInterface) {
return $this->delegate->hasCacheableSupportsMethod();
}
Expand Down
Expand Up @@ -11,17 +11,9 @@

namespace Symfony\Component\Serializer\Tests\Debug\Normalizer;

use Symfony\Component\Serializer\Exception\CircularReferenceException;
use Symfony\Component\Serializer\Exception\ExceptionInterface;
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
use Symfony\Component\Serializer\Exception\LogicException;
use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

/**
* Class Test
* @package Debug\Normalizer
*/
final class TestCacheableNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface
{
/**
Expand Down
Expand Up @@ -221,18 +221,18 @@ public function testAwarenessDelegation(): void
/**
* @dataProvider provideYesNo
*/
public function testCacheableSupport(bool $isCachable):void
public function testCacheableSupport(bool $isCachable): void
{
$tracer = new TraceableHybridNormalizer(new TestCacheableNormalizer($isCachable));
self::assertSame($isCachable, $tracer->hasCacheableSupportsMethod());
}

public function testCacheableSupportOnNonCacheableDelegates():void
public function testCacheableSupportOnNonCacheableDelegates(): void
{
self::assertFalse($this->traceableNormalizer->hasCacheableSupportsMethod());
}

public function provideYesNo():iterable
public function provideYesNo(): iterable
{
yield 'yes' => [true];
yield 'no' => [false];
Expand Down

0 comments on commit 52ed5d0

Please sign in to comment.