Your project should not use invalid return types 4
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_return_typehint
- /**
- * @phpstan-return non-empty-string
- */
- private function getSeparator(FormFieldDefinition $fieldDefinition): string
- {
- return $fieldDefinition->getOptions()['separator'] ?? ArrayTextType::DEFAULT_SEPARATOR;
- }
- }
- $data = [];
- foreach ($fields as $field) {
- $data[$field] = $matrixRecord->$field;
- }
- return $data;
- }
- /**
- * @param array<string, scalar> $matrixDataToCompare
- */
- foreach ($primaryKeyData as $primaryKeyName => $primaryValue) {
- $criteria[$primaryKeyName][] = ['!=', $primaryValue];
- }
- return $criteria;
- }
- /**
- * @param array<string, array<int, array{0: string, 1: scalar}>> $criteria
- */
- *
- * @return array<scalar|null>
- */
- private function getMatrixRecordDataForDuplicationCheck(MatrixRecord $matrixRecord, array $fieldsUsedInDuplicationCheck): array
- {
- return array_intersect_key($matrixRecord->getData(), array_flip($fieldsUsedInDuplicationCheck));
- }
- }
Your project should use return types 5
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.missing_return_typehint
- }
- return implode($this->separator, $value);
- }
- public function reverseTransform(mixed $value): array
- {
- if (!is_string($value)) {
- throw new UnexpectedValueException('Only strings are allowed');
- }
- public function getEntityTranslationRelationName(): ?string;
- /**
- * Use this method to pass constraints to the main Matrix form.
- */
- public function getMatrixConstraints(): array;
- /**
- * Use this method to set allowed file extensions.
- */
- public function getAllowedFileExtensions(): array;
- public function getMatrixConstraints(): array;
- /**
- * Use this method to set allowed file extensions.
- */
- public function getAllowedFileExtensions(): array;
- /**
- * Import data from matrix to database.
- */
- public function import(Matrix $matrix): void;
- public function getClass(): string
- {
- return $this->class;
- }
- public function getOptions(): array
- {
- return $this->options;
- }
- }
- public function setEntity(?object $entity): void
- {
- $this->entity = $entity;
- }
- public function getData(): array
- {
- return $this->data;
- }
- public function __isset(string $name): bool