diff --git a/docs/examples/04-adding-your-own-tag.php b/docs/examples/04-adding-your-own-tag.php index 63dbb2f3..40d80ba0 100644 --- a/docs/examples/04-adding-your-own-tag.php +++ b/docs/examples/04-adding-your-own-tag.php @@ -85,7 +85,7 @@ public function __construct(?Description $description = null) * @see Tag for the interface declaration of the `create` method. * @see Tag::create() for more information on this method's workings. */ - public static function create(string $body, DescriptionFactory $descriptionFactory = null, Context $context = null): self + public static function create(string $body, ?DescriptionFactory $descriptionFactory = null, ?Context $context = null): self { Assert::notNull($descriptionFactory); diff --git a/tests/unit/Assets/CustomParam.php b/tests/unit/Assets/CustomParam.php index 80b3955a..cfb1f568 100644 --- a/tests/unit/Assets/CustomParam.php +++ b/tests/unit/Assets/CustomParam.php @@ -21,7 +21,7 @@ public function getName() : string return 'spy'; } - public static function create(string $body, FqsenResolver $fqsenResolver = null, ?string $myParam = null) + public static function create(string $body, ?FqsenResolver $fqsenResolver = null, ?string $myParam = null) { $tag = new self(); $tag->fqsenResolver = $fqsenResolver; diff --git a/tests/unit/Assets/CustomServiceClass.php b/tests/unit/Assets/CustomServiceClass.php index c5542602..d58168f3 100644 --- a/tests/unit/Assets/CustomServiceClass.php +++ b/tests/unit/Assets/CustomServiceClass.php @@ -18,7 +18,7 @@ public function getName() : string return 'spy'; } - public static function create(string $body, PassthroughFormatter $formatter = null) + public static function create(string $body, ?PassthroughFormatter $formatter = null) { $tag = new self(); $tag->formatter = $formatter; diff --git a/tests/unit/Assets/CustomServiceInterface.php b/tests/unit/Assets/CustomServiceInterface.php index 36bd753c..732da87f 100644 --- a/tests/unit/Assets/CustomServiceInterface.php +++ b/tests/unit/Assets/CustomServiceInterface.php @@ -19,7 +19,7 @@ public function getName() : string return 'spy'; } - public static function create(string $body, Formatter $formatter = null) + public static function create(string $body, ?Formatter $formatter = null) { $tag = new self(); $tag->formatter = $formatter; diff --git a/tests/unit/Assets/CustomTagFactory.php b/tests/unit/Assets/CustomTagFactory.php index 7a3b3a9e..8179a330 100644 --- a/tests/unit/Assets/CustomTagFactory.php +++ b/tests/unit/Assets/CustomTagFactory.php @@ -23,7 +23,7 @@ class CustomTagFactory implements Factory /** @var CustomServiceClass|null */ public $class; - public function create(string $tagLine, ?Context $context = null, CustomServiceClass $class = null): Tag + public function create(string $tagLine, ?Context $context = null, ?CustomServiceClass $class = null): Tag { $this->class = $class;