You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix PHPStan booleanAnd.alwaysFalse and related errors
- ArgonHasher.php: Add booleanAnd.alwaysFalse to existing platform-specific ignore
- Email.php, File.php, Password.php: Add ignores for instanceof.alwaysTrue
and booleanAnd.alwaysFalse (PHPStan's callable|static type narrowing
doesn't account for closures not being class instances)
- StartSession.php: Add booleanAnd.alwaysFalse to existing bug ignore
Copy file name to clipboardExpand all lines: src/validation/src/Rules/Email.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ public static function defaults(mixed $callback = null): ?static
71
71
returnstatic::default();
72
72
}
73
73
74
-
if (! is_callable($callback) && ! $callbackinstanceof static) {
74
+
if (! is_callable($callback) && ! $callbackinstanceof static) {// @phpstan-ignore instanceof.alwaysTrue, booleanAnd.alwaysFalse (callable values like closures are not instances)
75
75
thrownewInvalidArgumentException('The given callback should be callable or an instance of ' . static::class);
Copy file name to clipboardExpand all lines: src/validation/src/Rules/File.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ public static function defaults(mixed $callback = null): ?static
82
82
returnstatic::default();
83
83
}
84
84
85
-
if (! is_callable($callback) && ! $callbackinstanceof static) {
85
+
if (! is_callable($callback) && ! $callbackinstanceof static) {// @phpstan-ignore instanceof.alwaysTrue, booleanAnd.alwaysFalse (callable values like closures are not instances)
86
86
thrownewInvalidArgumentException('The given callback should be callable or an instance of ' . static::class);
Copy file name to clipboardExpand all lines: src/validation/src/Rules/Password.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ public static function defaults(mixed $callback = null): ?static
108
108
returnstatic::default();
109
109
}
110
110
111
-
if (! is_callable($callback) && ! $callbackinstanceof static) {
111
+
if (! is_callable($callback) && ! $callbackinstanceof static) {// @phpstan-ignore instanceof.alwaysTrue, booleanAnd.alwaysFalse (callable values like closures are not instances)
112
112
thrownewInvalidArgumentException('The given callback should be callable or an instance of ' . static::class);
0 commit comments