Your project should not use invalid return types 2

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

  1. /**
  2. * @phpstan-return non-empty-string
  3. */
  4. private function getSeparator(FormFieldDefinition $fieldDefinition): string
  5. {
  6. return $fieldDefinition->getOptions()['separator'] ?? ArrayTextType::DEFAULT_SEPARATOR;

    Method JG\BatchEntityImportBundle\Model\Configuration\AbstractImportConfiguration::getSeparator() should return non-empty-string but returns mixed.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Jarosław Grygierek
  7. }
  8. }
  1. $data = [];
  2. foreach ($fields as $field) {
  3. $data[$field] = $matrixRecord->$field;
  4. }
  5. return $data;

    Method JG\BatchEntityImportBundle\Validator\Constraints\DatabaseEntityUniqueValidator::getMatrixRecordDataToCompare() should return array<string, bool|float|int|string> but returns array<string, mixed>.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Jarek
  6. }
  7. /**
  8. * @param array<string, scalar> $matrixDataToCompare
  9. */

Your project should use return types 4

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

  1. }
  2. return implode($this->separator, $value);
  3. }
  4. public function reverseTransform(mixed $value): array

    Method JG\BatchEntityImportBundle\Form\Type\ArrayTextType::reverseTransform() return type has no value type specified in iterable type array.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Pierre Svgnt
  5. {
  6. if (!is_string($value)) {
  7. throw new UnexpectedValueException('Only strings are allowed');
  8. }
  1. public function getEntityTranslationRelationName(): ?string;
  2. /**
  3. * Use this method to pass constraints to the main Matrix form.
  4. */
  5. public function getMatrixConstraints(): array;

    Method JG\BatchEntityImportBundle\Model\Configuration\ImportConfigurationInterface::getMatrixConstraints() return type has no value type specified in iterable type array.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Jarek
  6. /**
  7. * Use this method to set allowed file extensions.
  8. */
  9. public function getAllowedFileExtensions(): array;
  1. public function getMatrixConstraints(): array;
  2. /**
  3. * Use this method to set allowed file extensions.
  4. */
  5. public function getAllowedFileExtensions(): array;

    Method JG\BatchEntityImportBundle\Model\Configuration\ImportConfigurationInterface::getAllowedFileExtensions() return type has no value type specified in iterable type array.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Jarek
  6. /**
  7. * Import data from matrix to database.
  8. */
  9. public function import(Matrix $matrix): void;
  1. public function getClass(): string
  2. {
  3. return $this->class;
  4. }
  5. public function getOptions(): array

    Method JG\BatchEntityImportBundle\Model\Form\FormFieldDefinition::getOptions() return type has no value type specified in iterable type array.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Jarek
  6. {
  7. return $this->options;
  8. }
  9. }