mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
sa: Fix all issues related to PHP versions and static-analysis.
This commit is contained in:
@@ -94,7 +94,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
||||
/**
|
||||
* @param AccompanyingPeriod|null $period
|
||||
*/
|
||||
public function normalize($period, ?string $format = null, array $context = [])
|
||||
public function normalize($period, $format = null, array $context = [])
|
||||
{
|
||||
if ($period instanceof AccompanyingPeriod) {
|
||||
$scopes = $this->scopeResolverDispatcher->isConcerned($period) ? $this->scopeResolverDispatcher->resolveScope($period) : [];
|
||||
@@ -147,7 +147,9 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
||||
'hasRequestor' => $period->getRequestor() !== null,
|
||||
'requestorKind' => $period->getRequestorKind(),
|
||||
];
|
||||
} elseif (null === $period) {
|
||||
}
|
||||
|
||||
if (null === $period) {
|
||||
return array_merge(
|
||||
(new NormalizeNullValueHelper($this->normalizer, 'type', 'accompanying_period'))
|
||||
->normalize(self::PERIOD_NULL, $format, $context),
|
||||
@@ -163,10 +165,10 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
|
||||
);
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException('this neither an accompanying period or null');
|
||||
throw new InvalidArgumentException('This neither an accompanying period or null.');
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
public function supportsNormalization($data, $format = null, array $context = []): bool
|
||||
{
|
||||
if ('docgen' !== $format) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user