Skip to content

Commit e87b219

Browse files
committed
Do not enforece return type in short closures
This is problematic because it is not possible to use void, but a short closure can call a void function
1 parent efa0869 commit e87b219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Inpsyde/Sniffs/CodeQuality/ReturnTypeDeclarationSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ReturnTypeDeclarationSniff implements Sniff
3434
*/
3535
public function register(): array
3636
{
37-
return [T_FUNCTION, T_CLOSURE, T_FN];
37+
return [T_FUNCTION, T_CLOSURE];
3838
}
3939

4040
/**

0 commit comments

Comments
 (0)