Your project should not use invalid return types 2
- 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
- */
Your project should use return types 4
- 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;
- }
- }