Skip to content

Commit 303a9c2

Browse files
FormElements: Adjust types and default value
Add types to `addDecoratorLoader()` and `addElementLoader()` and set the default value of `$postfix` to an empty string to be compatible with ipl-stdlib.
1 parent b2efe58 commit 303a9c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FormElement/FormElements.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ public function addElementsFrom($form)
438438
* @return $this
439439
* @deprecated Use {@see addElementDecoratorLoaderPaths()} instead
440440
*/
441-
public function addDecoratorLoader($namespace, $postfix = null)
441+
public function addDecoratorLoader(string $namespace, string $postfix = ''): static
442442
{
443443
$this->addPluginLoader('decorator', $namespace, $postfix);
444444

@@ -453,7 +453,7 @@ public function addDecoratorLoader($namespace, $postfix = null)
453453
*
454454
* @return $this
455455
*/
456-
public function addElementLoader($namespace, $postfix = null)
456+
public function addElementLoader(string $namespace, string $postfix = ''): static
457457
{
458458
$this->addPluginLoader('element', $namespace, $postfix);
459459

0 commit comments

Comments
 (0)