Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 48025e8

Browse filesBrowse files
committed
cleanup return types to keep test aligned with existing tests and removed unnecessary null initialization
1 parent 801b9c8 commit 48025e8
Copy full SHA for 48025e8

File tree

1 file changed

+8
-8
lines changed
Filter options

1 file changed

+8
-8
lines changed

‎src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -562,19 +562,19 @@ public function testChildContextKeepsOriginalContextCacheKey()
562562
];
563563

564564
$normalizer = new class() extends AbstractObjectNormalizerDummy {
565-
public $childContextCacheKey = null;
565+
public $childContextCacheKey;
566566

567-
protected function extractAttributes(object $object, string $format = null, array $context = []): array
567+
protected function extractAttributes(object $object, string $format = null, array $context = [])
568568
{
569569
return array_keys((array) $object);
570570
}
571571

572-
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed
572+
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = [])
573573
{
574574
return $object->{$attribute};
575575
}
576576

577-
protected function createChildContext(array $parentContext, string $attribute, ?string $format): array
577+
protected function createChildContext(array $parentContext, string $attribute, ?string $format)
578578
{
579579
$childContext = parent::createChildContext($parentContext, $attribute, $format);
580580
$this->childContextCacheKey = $childContext['cache_key'];
@@ -606,19 +606,19 @@ public function testChildContextCacheKeyStaysFalseWhenOriginalCacheKeyIsFalse()
606606
];
607607

608608
$normalizer = new class() extends AbstractObjectNormalizerDummy {
609-
public $childContextCacheKey = null;
609+
public $childContextCacheKey;
610610

611-
protected function extractAttributes(object $object, string $format = null, array $context = []): array
611+
protected function extractAttributes(object $object, string $format = null, array $context = [])
612612
{
613613
return array_keys((array) $object);
614614
}
615615

616-
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed
616+
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = [])
617617
{
618618
return $object->{$attribute};
619619
}
620620

621-
protected function createChildContext(array $parentContext, string $attribute, ?string $format): array
621+
protected function createChildContext(array $parentContext, string $attribute, ?string $format)
622622
{
623623
$childContext = parent::createChildContext($parentContext, $attribute, $format);
624624
$this->childContextCacheKey = $childContext['cache_key'];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.