diff --git a/typo3/sysext/form/Classes/Controller/FormEditorController.php b/typo3/sysext/form/Classes/Controller/FormEditorController.php index c0b17e3200e67f556055a9b8cbd9299358907062..c163b1d227c24e9dd946e8e3ef1ca735d70ce4eb 100644 --- a/typo3/sysext/form/Classes/Controller/FormEditorController.php +++ b/typo3/sysext/form/Classes/Controller/FormEditorController.php @@ -86,7 +86,7 @@ class FormEditorController extends AbstractBackendController * @throws PersistenceManagerException * @internal */ - public function indexAction(string $formPersistenceIdentifier, string $prototypeName = null): ResponseInterface + public function indexAction(string $formPersistenceIdentifier, ?string $prototypeName = null): ResponseInterface { if (!$this->formPersistenceManager->isAllowedPersistencePath($formPersistenceIdentifier)) { throw new PersistenceManagerException(sprintf('Read "%s" is not allowed', $formPersistenceIdentifier), 1614500662); @@ -256,7 +256,7 @@ class FormEditorController extends AbstractBackendController public function renderFormPageAction( FormDefinitionArray $formDefinition, int $pageIndex, - string $prototypeName = null + ?string $prototypeName = null ): ResponseInterface { $prototypeName = $prototypeName ?: $formDefinition['prototypeName'] ?? 'standard'; $formDefinition = $formDefinition->getArrayCopy(); diff --git a/typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/ValidationDto.php b/typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/ValidationDto.php index f2ddd520c5e3ac42c504f2a91118116fd5fcf4b1..899cd17456c1a7af0bb43c3b40795d86601917f2 100644 --- a/typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/ValidationDto.php +++ b/typo3/sysext/form/Classes/Domain/Configuration/FormDefinition/Validators/ValidationDto.php @@ -60,12 +60,12 @@ class ValidationDto * @param string $propertyCollectionElementIdentifier */ public function __construct( - string $prototypeName = null, - string $formElementType = null, - string $formElementIdentifier = null, - string $propertyPath = null, - string $propertyCollectionName = null, - string $propertyCollectionElementIdentifier = null + ?string $prototypeName = null, + ?string $formElementType = null, + ?string $formElementIdentifier = null, + ?string $propertyPath = null, + ?string $propertyCollectionName = null, + ?string $propertyCollectionElementIdentifier = null ) { $this->prototypeName = $prototypeName; $this->formElementType = $formElementType; diff --git a/typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php b/typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php index ba62b7b657a959c88f5e1af00792016828a94d54..d6700ac36545808c6a4c2666116ead4c2cad2962 100644 --- a/typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php +++ b/typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php @@ -46,7 +46,7 @@ class ArrayFormFactory extends AbstractFormFactory * @throws RenderingException * @internal */ - public function build(array $configuration, string $prototypeName = null): FormDefinition + public function build(array $configuration, ?string $prototypeName = null): FormDefinition { if (empty($prototypeName)) { $prototypeName = $configuration['prototypeName'] ?? 'standard'; diff --git a/typo3/sysext/form/Classes/Domain/Factory/FormFactoryInterface.php b/typo3/sysext/form/Classes/Domain/Factory/FormFactoryInterface.php index 08aca7b329f642b818cfd42dd6ba958b396d5399..dab0d5240fc8c7a312b89912277bf003024ebb25 100644 --- a/typo3/sysext/form/Classes/Domain/Factory/FormFactoryInterface.php +++ b/typo3/sysext/form/Classes/Domain/Factory/FormFactoryInterface.php @@ -45,5 +45,5 @@ interface FormFactoryInterface * @param string $prototypeName The name of the "PrototypeName" to use; it is factory-specific to implement this. * @return FormDefinition a newly built form definition */ - public function build(array $configuration, string $prototypeName = null): FormDefinition; + public function build(array $configuration, ?string $prototypeName = null): FormDefinition; } diff --git a/typo3/sysext/form/Classes/Domain/Model/FormDefinition.php b/typo3/sysext/form/Classes/Domain/Model/FormDefinition.php index 19916151654b02036ef58319b3f3e6183bc1ac2f..12475c8b816dd23f4f1345775d9cc1b2de72b696 100644 --- a/typo3/sysext/form/Classes/Domain/Model/FormDefinition.php +++ b/typo3/sysext/form/Classes/Domain/Model/FormDefinition.php @@ -302,7 +302,7 @@ class FormDefinition extends AbstractCompositeRenderable implements VariableRend string $identifier, array $prototypeConfiguration = [], string $type = 'Form', - string $persistenceIdentifier = null + ?string $persistenceIdentifier = null ) { $this->typeDefinitions = $prototypeConfiguration['formElementsDefinition'] ?? []; $this->validatorsDefinition = $prototypeConfiguration['validatorsDefinition'] ?? []; diff --git a/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FormSession.php b/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FormSession.php index 73fe89bfbdc0483e6272b8fdb776bd8041b17b63..5c799687da79b5847bc03c339e9642c30e6e60ac 100644 --- a/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FormSession.php +++ b/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FormSession.php @@ -37,7 +37,7 @@ class FormSession * @param string|null $authenticatedIdentifier * @throws BadRequestException */ - public function __construct(string $authenticatedIdentifier = null) + public function __construct(?string $authenticatedIdentifier = null) { if ($authenticatedIdentifier === null) { $this->identifier = $this->generateIdentifier(); diff --git a/typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManager.php b/typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManager.php index 4eab55ee23c2898eb4551703e94d8c9045534bc8..0904af00ec40d259fdc60d0acd889eca6fc37653 100644 --- a/typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManager.php +++ b/typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManager.php @@ -60,7 +60,7 @@ class ConfigurationManager extends ExtbaseConfigurationManager implements Config * @return array The configuration * @internal */ - public function getConfiguration(string $configurationType, string $extensionName = null, string $pluginName = null): array + public function getConfiguration(string $configurationType, ?string $extensionName = null, ?string $pluginName = null): array { switch ($configurationType) { case self::CONFIGURATION_TYPE_YAML_SETTINGS: diff --git a/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/FormDefinitionArrayConverter.php b/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/FormDefinitionArrayConverter.php index 02c4f63f4b565744691212aea2a092e193cd9dbc..2b16739eef56654806100b7eb2c2509f2df792ed 100644 --- a/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/FormDefinitionArrayConverter.php +++ b/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/FormDefinitionArrayConverter.php @@ -66,7 +66,7 @@ class FormDefinitionArrayConverter extends AbstractTypeConverter * @return FormDefinitionArray * @throws PropertyException */ - public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) + public function convertFrom($source, $targetType, array $convertedChildProperties = [], ?PropertyMappingConfigurationInterface $configuration = null) { $rawFormDefinitionArray = json_decode($source, true); diff --git a/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php b/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php index 3f855af403551df7062672e47fc5d9d0e307275f..1514169fc7a02e11158d22920fe25bc8985b8225 100644 --- a/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php +++ b/typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php @@ -153,7 +153,7 @@ class UploadedFileReferenceConverter extends AbstractTypeConverter * @return AbstractFileFolder|Error|null * @internal */ - public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null) + public function convertFrom($source, $targetType, array $convertedChildProperties = [], ?PropertyMappingConfigurationInterface $configuration = null) { // slot/listener using `FileDumpController` instead of direct public URL in (later) rendering process $resourcePublicationSlot = GeneralUtility::makeInstance(ResourcePublicationSlot::class); @@ -263,7 +263,7 @@ class UploadedFileReferenceConverter extends AbstractTypeConverter */ protected function createFileReferenceFromFalFileObject( File $file, - int $resourcePointer = null + ?int $resourcePointer = null ): PseudoFileReference { $fileReference = $this->resourceFactory->createFileReferenceObject( [ @@ -287,7 +287,7 @@ class UploadedFileReferenceConverter extends AbstractTypeConverter */ protected function createFileReferenceFromFalFileReferenceObject( CoreFileReference $falFileReference, - int $resourcePointer = null + ?int $resourcePointer = null ): PseudoFileReference { if ($resourcePointer === null) { $fileReference = GeneralUtility::makeInstance(PseudoFileReference::class); diff --git a/typo3/sysext/form/Classes/Service/TranslationService.php b/typo3/sysext/form/Classes/Service/TranslationService.php index 3766da58d9b1d0fe8980b9eb0db41406d0d51cda..16a4dfc013781065b016ad37c3ba38a8b6c4f732 100644 --- a/typo3/sysext/form/Classes/Service/TranslationService.php +++ b/typo3/sysext/form/Classes/Service/TranslationService.php @@ -107,9 +107,9 @@ class TranslationService implements SingletonInterface */ public function translate( $key, - array $arguments = null, - string $locallangPathAndFilename = null, - string $language = null, + ?array $arguments = null, + ?string $locallangPathAndFilename = null, + ?string $language = null, $defaultValue = '' ) { $value = null; @@ -219,7 +219,7 @@ class TranslationService implements SingletonInterface */ public function translateToAllBackendLanguages( string $key, - array $arguments = null, + ?array $arguments = null, array $translationFiles = [] ): array { $result = []; @@ -546,8 +546,8 @@ class TranslationService implements SingletonInterface */ protected function processTranslationChain( array $translationKeyChain, - string $language = null, - array $arguments = null + ?string $language = null, + ?array $arguments = null ) { $translatedValue = null; foreach ($translationKeyChain as $translationKey) { diff --git a/typo3/sysext/form/Classes/Slot/FilePersistenceSlot.php b/typo3/sysext/form/Classes/Slot/FilePersistenceSlot.php index a56cc3e0f3e126be3516e5644741b07374d2bccd..9d46d0933002b9bf7d77eb55f5661cfc8b44ceea 100644 --- a/typo3/sysext/form/Classes/Slot/FilePersistenceSlot.php +++ b/typo3/sysext/form/Classes/Slot/FilePersistenceSlot.php @@ -71,7 +71,7 @@ final class FilePersistenceSlot implements SingletonInterface * @param string $command * @param bool|null $type */ - public function defineInvocation(string $command, bool $type = null) + public function defineInvocation(string $command, ?bool $type = null) { $this->definedInvocations[$command] = $type; if ($type === null) { @@ -93,7 +93,7 @@ final class FilePersistenceSlot implements SingletonInterface public function allowInvocation( string $command, string $combinedFileIdentifier, - string $contentSignature = null + ?string $contentSignature = null ): bool { $index = $this->searchAllowedInvocation( $command, @@ -218,7 +218,7 @@ final class FilePersistenceSlot implements SingletonInterface protected function assertFileName( string $command, string $combinedFileIdentifier, - string $content = null + ?string $content = null ): void { if (!$this->isFormDefinition($combinedFileIdentifier)) { return; @@ -271,7 +271,7 @@ final class FilePersistenceSlot implements SingletonInterface protected function searchAllowedInvocation( string $command, string $combinedFileIdentifier, - string $contentSignature = null + ?string $contentSignature = null ): ?int { foreach ($this->allowedInvocations as $index => $allowedInvocation) { if ( diff --git a/typo3/sysext/form/Classes/ViewHelpers/Form/TimePickerViewHelper.php b/typo3/sysext/form/Classes/ViewHelpers/Form/TimePickerViewHelper.php index fe418d9122e9bfe4d83b3cfed4dcc045a45d94ce..9df8ea523205d8e92fed32c630cbaacd820190f2 100644 --- a/typo3/sysext/form/Classes/ViewHelpers/Form/TimePickerViewHelper.php +++ b/typo3/sysext/form/Classes/ViewHelpers/Form/TimePickerViewHelper.php @@ -126,7 +126,7 @@ class TimePickerViewHelper extends AbstractFormFieldViewHelper * @param \DateTime $date * @return string */ - protected function buildHourSelector(\DateTime $date = null): string + protected function buildHourSelector(?\DateTime $date = null): string { $value = $date !== null ? $date->format('H') : null; $hourSelector = clone $this->tag; @@ -145,7 +145,7 @@ class TimePickerViewHelper extends AbstractFormFieldViewHelper * @param \DateTime $date * @return string */ - protected function buildMinuteSelector(\DateTime $date = null): string + protected function buildMinuteSelector(?\DateTime $date = null): string { $value = $date !== null ? $date->format('i') : null; $minuteSelector = clone $this->tag;