Skip to content

Commit

Permalink
fix: return type of set parent object and property
Browse files Browse the repository at this point in the history
The interface PimBasedTypeConverterInterface defines the method setParentObjectAndProperty with the return type of mixed.

However, this method does not return anything, therefor the return type changed to void.

Furthermore, the classes implementing this interface now uses the correct method signature.

Refs: mia3#30
  • Loading branch information
3l73 committed Jan 20, 2025
1 parent 462e402 commit 7f4b3a6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class AbstractUuidAwareObjectTypeConverter extends PersistentObjectConv
* @param string $propertyName
* @return void
*/
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): mixed
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): void
{
$this->parent = $object;
$this->propertyName = $propertyName;
Expand Down
2 changes: 1 addition & 1 deletion Classes/TypeConverter/ComplexTypeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ComplexTypeConverter extends AbstractUuidAwareObjectTypeConverter implemen
* @param string $propertyName
* @return void
*/
public function setParentObjectAndProperty($object, $propertyName):null
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): void
{
$this->parentObject = $object;
$this->propertyName = $propertyName;
Expand Down
2 changes: 1 addition & 1 deletion Classes/TypeConverter/FileReferenceTypeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMa
* @param string $propertyName
* @return void
*/
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): mixed
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): void
{
$this->parentObject = $object;
$this->propertyName = $propertyName;
Expand Down
2 changes: 1 addition & 1 deletion Classes/TypeConverter/PimBasedTypeConverterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ interface PimBasedTypeConverterInterface extends TypeConverterInterface
* @param string $propertyName
* @return mixed
*/
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): mixed;
public function setParentObjectAndProperty(AbstractEntity $object, string $propertyName): void;
}

0 comments on commit 7f4b3a6

Please sign in to comment.