Skip to content

Commit 76b771c

Browse files
TomasVotrubajaapio
authored andcommitted
examples: apply typehints
1 parent 91c067a commit 76b771c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/04-adding-your-own-tag.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ public function __construct(Description $description = null)
8383
*
8484
* @see Tag for the interface declaration of the `create` method.
8585
* @see Tag::create() for more information on this method's workings.
86-
*
87-
* @return MyTag
8886
*/
89-
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
87+
public static function create(string $body, DescriptionFactory $descriptionFactory = null, Context $context = null): MyTag
9088
{
9189
Assert::string($body);
9290
Assert::notNull($descriptionFactory);
@@ -99,10 +97,8 @@ public static function create($body, DescriptionFactory $descriptionFactory = nu
9997
*
10098
* This method is used to reconstitute a DocBlock into its original form by the {@see Serializer}. It should
10199
* feature all parts of the tag so that the serializer can put it back together.
102-
*
103-
* @return string
104100
*/
105-
public function __toString()
101+
public function __toString(): string
106102
{
107103
return (string)$this->description;
108104
}

0 commit comments

Comments
 (0)