Skip to content

Commit

Permalink
phpcs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Nov 27, 2023
1 parent f50ed69 commit 0c54d65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Class/Method/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check warning on line 1851 in src/Class/Method/Method.php

View check run for this annotation

Codecov / codecov/patch

src/Class/Method/Method.php#L1848-L1851

Added lines #L1848 - L1851 were not covered by tests
Expand Down
3 changes: 1 addition & 2 deletions src/Statements/ReturnStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace Zephir\Statements;

use ReflectionException;
use Zephir\CompilationContext;
use Zephir\Exception;
use Zephir\Exception\CompilerException;
Expand All @@ -33,7 +32,7 @@ final class ReturnStatement extends StatementAbstract
* @param CompilationContext $compilationContext
*
* @throws Exception
* @throws ReflectionException
* @throws \ReflectionException
*/
public function compile(CompilationContext $compilationContext): void
{
Expand Down

0 comments on commit 0c54d65

Please sign in to comment.