Skip to content

Commit

Permalink
Do not enforece return type in short closures
Browse files Browse the repository at this point in the history
This is problematic because it is not possible to use void, but a short
closure can call a void function
  • Loading branch information
gmazzap committed Aug 30, 2023
1 parent efa0869 commit e87b219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Inpsyde/Sniffs/CodeQuality/ReturnTypeDeclarationSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ReturnTypeDeclarationSniff implements Sniff
*/
public function register(): array
{
return [T_FUNCTION, T_CLOSURE, T_FN];
return [T_FUNCTION, T_CLOSURE];
}

/**
Expand Down

0 comments on commit e87b219

Please sign in to comment.