Skip to content

Commit c399d1f

Browse files
committed
Fixed PropertyInterface::setType() signature mismatch
the doc comment (as well as all the implementors) say it should be this. In addition, null may be passed in multiple places where this is used. This was found using [PHPStan](https://phpstan.org), along with a few other errors.
1 parent 5cef589 commit c399d1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/Property/PropertyInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getType(bool $outputType = false): ?PropertyType;
4242
*
4343
* @return PropertyInterface
4444
*/
45-
public function setType(PropertyType $type, PropertyType $outputType = null): PropertyInterface;
45+
public function setType(PropertyType $type = null, PropertyType $outputType = null): PropertyInterface;
4646

4747
/**
4848
* @param bool $outputType If set to true the output type hint will be returned (may differ from the base type)

0 commit comments

Comments
 (0)