examples: apply typehints

This commit is contained in:
TomasVotruba
2017-11-30 10:27:01 +01:00
committed by Jaap van Otterdijk
parent 91c067abe5
commit 76b771c23e
+2 -6
View File
@@ -83,10 +83,8 @@ final class MyTag extends BaseTag implements StaticMethod
*
* @see Tag for the interface declaration of the `create` method.
* @see Tag::create() for more information on this method's workings.
*
* @return MyTag
*/
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
public static function create(string $body, DescriptionFactory $descriptionFactory = null, Context $context = null): MyTag
{
Assert::string($body);
Assert::notNull($descriptionFactory);
@@ -99,10 +97,8 @@ final class MyTag extends BaseTag implements StaticMethod
*
* This method is used to reconstitute a DocBlock into its original form by the {@see Serializer}. It should
* feature all parts of the tag so that the serializer can put it back together.
*
* @return string
*/
public function __toString()
public function __toString(): string
{
return (string)$this->description;
}