Code should not be duplicated 2

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. }
  2. /**
  3. * {@inheritdoc}
  4. */
  5. public function supportsNormalization($data, $format = null, array $context = []): bool

    The next 25 lines appear in src/GraphQl/Serializer/ObjectNormalizer.php:49, src/Hal/Serializer/ObjectNormalizer.php:42 and src/JsonApi/Serializer/ObjectNormalizer.php:49.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Teoh Han Hui
  6. {
  7. return self::FORMAT === $format && $this->decorated->supportsNormalization($data, $format, $context);
  8. }
  9. /**
  1. private $attributesMetadataCache = [];
  2. /**
  3. * {@inheritdoc}
  4. */
  5. public function supportsNormalization($data, $format = null): bool

    The next 27 lines appear both in src/Hal/Serializer/ItemNormalizer.php:43 and src/JsonApi/Serializer/ItemNormalizer.php:61.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Teoh Han Hui
  6. {
  7. return self::FORMAT === $format && parent::supportsNormalization($data, $format);
  8. }
  9. /**

Templates should not be too long

More information: https://insight.symfony.com/what-we-analyse/twig.template_too_long

25% of all your templates have more than 200 lines, the threshold is 5%.

Time to fix: about 6 hours
Open Issue Permalink
Collective

Unused method, property, variable or parameter 2

More information: https://insight.symfony.com/what-we-analyse/php.unused_local_variable_or_private_member

  1. *
  2. * @var int
  3. *
  4. * @deprecated - Use $paginationMaximumItemsPerPage instead
  5. */
  6. private $maximumItemsPerPage;

    This maximumItemsPerPage attribute is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Beno!t POLASZEK
  7. /**
  8. * @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
  9. *
  10. * @var int
  1. /**
  2. * @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
  3. *
  4. * @var int
  5. */
  6. private $paginationMaximumItemsPerPage;

    This paginationMaximumItemsPerPage attribute is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Beno!t POLASZEK
  7. /**
  8. * @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
  9. *
  10. * @var int