From fed26de0e281a2b9271a31168b4196cbc7c2eb3d Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 27 Nov 2023 11:17:33 -0600 Subject: [PATCH] phpcs --- src/Class/Method/Method.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Class/Method/Method.php b/src/Class/Method/Method.php index 1b68b3f96..92a4c40c7 100644 --- a/src/Class/Method/Method.php +++ b/src/Class/Method/Method.php @@ -1847,7 +1847,8 @@ public function compile(CompilationContext $compilationContext): void */ if ( 'return' !== $lastType && - 'throw' !== $lastType && !$this->hasChildReturnStatementType($statement) && + 'throw' !== $lastType && + !$this->hasChildReturnStatementType($statement) && $this->hasReturnTypes() ) { throw new CompilerException(