Skip to content

Commit

Permalink
PHPStan: enable bleeding edge
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 2, 2024
1 parent eae3d67 commit 97c73be
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions generator/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- phar://phpstan.phar/conf/bleedingEdge.neon

parameters:
paths:
- ./src
# The level 9 is the highest level (with check for mixed type)
level: 8
ignoreErrors:
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
1 change: 0 additions & 1 deletion generator/src/PhpStanFunctions/PhpStanType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function __construct(string $data, bool $writeOnly = false)
$falsable = true;
\array_splice($returnTypes, (int) $falsablePosition, 1);
}
/** @var int $count */
$count = \count($returnTypes);
if ($count === 0) {
$returnType = '';
Expand Down
1 change: 1 addition & 0 deletions lib/special_cases.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* into associative arrays.
* @param int<1, max> $depth User specified recursion depth.
* @param int $flags Bitmask of JSON decode options.
* @param-out int $flags
*
* @return mixed
* @throws JsonException if the JSON cannot be decoded.
Expand Down
6 changes: 4 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
- phar://phpstan.phar/conf/bleedingEdge.neon

parameters:
paths:
- ./lib
# The level 9 is the highest level (with check for mixed type)
level: 8
ignoreErrors:
# A lot of functions are in extensions so it is ok not to find those
includes:
- vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon

0 comments on commit 97c73be

Please sign in to comment.