Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix | PHPStan v1.11 #426

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"illuminate/collections": "^9.39 || ^10.0",
"league/flysystem": "^3.0",
"pestphp/pest": "^2.6",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^1.11.4",
"saloonphp/xml-wrangler": "^1.1",
"spatie/ray": "^1.33",
"symfony/dom-crawler": "^6.0 || ^7.0",
Expand Down
55 changes: 5 additions & 50 deletions phpstan.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,6 @@ parameters:
count: 1
path: src/Http/Faking/MockClient.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Http/Connector.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Http/PendingRequest.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Http/Request.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/ArrayStore.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/IntegerStore.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/Body/ArrayBodyRepository.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/Body/MultipartBodyRepository.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/Body/StringBodyRepository.php

-
message: "#^Parameter \\#2 \\$ of callable callable\\(\\$this, TValue\\)\\: void expects TValue\\, array\\|float\\|int\\|string\\|false\\|null given.$#"
count: 2
path: src/Repositories/Body/StreamBodyRepository.php

-
message: "#^Result of \\&\\& is always false.$#"
count: 1
Expand All @@ -85,11 +40,6 @@ parameters:
count: 1
path: src/Http/Faking/MockClient.php

-
message: "#^Match arm is unreachable because previous comparison is always true.$#"
count: 1
path: src/Http/Pool.php

-
message: "#^Parameter \\#1 \\$object of method ReflectionMethod\\:\\:invoke\\(\\) expects object\\|null, class-string\\|object given.$#"
count: 2
Expand All @@ -99,3 +49,8 @@ parameters:
message: "#^Parameter \\#1 \\$callback of function call_user_func_array expects callable\\(\\)\\: mixed, \\(callable\\(\\)\\: mixed\\)\\|object given.$#"
count: 4
path: src/Traits/Macroable.php

-
message: "#^Match arm is unreachable because previous comparison is always true.$#"
count: 1
path: src/Http/Pool.php
16 changes: 6 additions & 10 deletions src/Traits/Conditionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ trait Conditionable
/**
* Invoke a callable where a given value returns a truthy value.
*
* @template TValue
*
* @param \Closure(): (TValue)|TValue $value
* @param callable($this, TValue): (void) $callback
* @param callable($this, TValue): (void)|null $default
* @param \Closure(): (mixed)|mixed $value
* @param callable($this, mixed): (void) $callback
* @param callable($this, mixed): (void)|null $default
* @return $this
*/
public function when(mixed $value, callable $callback, callable|null $default = null): static
Expand All @@ -38,11 +36,9 @@ public function when(mixed $value, callable $callback, callable|null $default =
/**
* Invoke a callable when a given value returns a falsy value.
*
* @template TValue
*
* @param \Closure(): (TValue)|TValue $value
* @param callable($this, TValue): (void) $callback
* @param callable($this, TValue): (void)|null $default
* @param \Closure(): (mixed)|mixed $value
* @param callable($this, mixed): (void) $callback
* @param callable($this, mixed): (void)|null $default
* @return $this
*/
public function unless(mixed $value, callable $callback, callable|null $default = null): static
Expand Down
Loading