Skip to content

Commit

Permalink
more phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Nov 27, 2023
1 parent 0c54d65 commit 9404210
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Class/Method/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -1845,10 +1845,10 @@ 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 &&
'throw' !== $lastType &&
!$this->hasChildReturnStatementType($statement) &&
$this->hasReturnTypes()
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
) {
throw new CompilerException(
'Reached end of the method without returning a valid type specified in the return-type hints',
Expand Down

0 comments on commit 9404210

Please sign in to comment.