From 350ee70ce4114049236c5a04e378d6060abe147e Mon Sep 17 00:00:00 2001 From: Dalibor Korpar Date: Thu, 9 Jan 2020 23:04:32 +0100 Subject: [PATCH] php 7.4 compatibility (#43) --- composer.json | 2 +- src/Kdyby/Aop/PhpGenerator/PointcutMethod.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3d304d9..14bef94 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "nette/php-generator": "^3.0", "nette/tokenizer": "~3.0", "nette/reflection": "^2.4", - "kdyby/annotations": "^2.6", + "kdyby/annotations": "^3.0", "symfony/property-access": "~4.2" }, "require-dev": { diff --git a/src/Kdyby/Aop/PhpGenerator/PointcutMethod.php b/src/Kdyby/Aop/PhpGenerator/PointcutMethod.php index 3e7ca6d..a03a72d 100644 --- a/src/Kdyby/Aop/PhpGenerator/PointcutMethod.php +++ b/src/Kdyby/Aop/PhpGenerator/PointcutMethod.php @@ -77,7 +77,7 @@ public static function from(Nette\Reflection\Method $from): PointcutMethod $method->setVariadic($from->isVariadic()); $method->setComment(Code\Helpers::unformatDocComment($from->getDocComment())); if ($from->hasReturnType()) { - $method->setReturnType((string) $from->getReturnType()); + $method->setReturnType(($from->getReturnType()->getName())); $method->setReturnNullable($from->getReturnType()->allowsNull()); } return $method;