sa: Fix all issues related to PHP versions and static-analysis.

This commit is contained in:
Pol Dellaiera
2021-12-21 11:58:58 +01:00
parent b3823161af
commit b743475761
25 changed files with 79 additions and 81 deletions

View File

@@ -15,10 +15,11 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use function array_keys;
use function is_array;
use Symfony\Component\Serializer\Encoder\EncoderInterface;
class DocGenEncoder implements \Symfony\Component\Serializer\Encoder\EncoderInterface
class DocGenEncoder implements EncoderInterface
{
public function encode($data, string $format, array $context = [])
public function encode($data, $format, array $context = [])
{
if (!$this->isAssociative($data)) {
throw new UnexpectedValueException('Only associative arrays are allowed; lists are not allowed');
@@ -30,7 +31,7 @@ class DocGenEncoder implements \Symfony\Component\Serializer\Encoder\EncoderInte
return $result;
}
public function supportsEncoding(string $format)
public function supportsEncoding($format)
{
return 'docgen' === $format;
}