Skip to content

Commit

Permalink
bump phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Jan 8, 2025
1 parent e5a268a commit 065087b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"chevere/regex": "^1.0.1"
},
"require-dev": {
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^9.5",
"symplify/easy-coding-standard": "^11.1"
},
Expand Down
4 changes: 1 addition & 3 deletions src/Arguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ public function toArray(): array
public function toArrayFill(mixed $fill): array
{
$filler = array_fill_keys($this->null, $fill);
/**
* @infection-ignore-all (false positive)
*/

return array_merge($filler, $this->arguments);
}

Expand Down
2 changes: 1 addition & 1 deletion src/BoolParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class BoolParameter implements BoolParameterInterface
use ParameterTrait;
use SchemaTrait;

private ?bool $default;
private bool $default;

public function __invoke(bool $value): bool
{
Expand Down
1 change: 0 additions & 1 deletion src/ReflectionParameterTyped.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function __construct(
$parameter = $attribute->parameter();
}
if ($this->reflection->isDefaultValueAvailable()
&& method_exists($parameter, 'withDefault')
&& $this->reflection->getDefaultValue() !== null
) {
/** @var ParameterInterface $parameter */
Expand Down
2 changes: 1 addition & 1 deletion src/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(
public function validator(): callable
{
/** @var callable */
return $this->validator;
return $this->validator; // @phpstan-ignore-line
}

public function primitive(): string
Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function validated(callable $callable, mixed ...$args): mixed

try {
/** @var callable $return */
$return($result);
$return($result); // @phpstan-ignore-line
} catch (Throwable $e) {
// @infection-ignore-all
throw new ReturnException(
Expand Down

0 comments on commit 065087b

Please sign in to comment.