From 0c54d655b7c1751cb429970d9edd47a18615e334 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 27 Nov 2023 11:57:37 -0600 Subject: [PATCH] phpcs changes --- src/Class/Method/Method.php | 3 +-- src/Statements/ReturnStatement.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Class/Method/Method.php b/src/Class/Method/Method.php index 92a4c40c7..d04e63434 100644 --- a/src/Class/Method/Method.php +++ b/src/Class/Method/Method.php @@ -1845,8 +1845,7 @@ public function compile(CompilationContext $compilationContext): void * If a method has return-type hints we need to ensure the last * statement is a 'return' statement */ - if ( - 'return' !== $lastType && + if ('return' !== $lastType && 'throw' !== $lastType && !$this->hasChildReturnStatementType($statement) && $this->hasReturnTypes() diff --git a/src/Statements/ReturnStatement.php b/src/Statements/ReturnStatement.php index 75a5567f7..2112ea0f8 100644 --- a/src/Statements/ReturnStatement.php +++ b/src/Statements/ReturnStatement.php @@ -13,7 +13,6 @@ namespace Zephir\Statements; -use ReflectionException; use Zephir\CompilationContext; use Zephir\Exception; use Zephir\Exception\CompilerException; @@ -33,7 +32,7 @@ final class ReturnStatement extends StatementAbstract * @param CompilationContext $compilationContext * * @throws Exception - * @throws ReflectionException + * @throws \ReflectionException */ public function compile(CompilationContext $compilationContext): void {