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

PHPStan: enable bleeding edge #494

Merged
merged 1 commit into from
Dec 2, 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
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 */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary phpdoc

$count = \count($returnTypes);
if ($count === 0) {
$returnType = '';
Expand Down
2 changes: 2 additions & 0 deletions lib/special_cases.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ function apcu_fetch($key)
* -1 (no limit).
* @param int $count If specified, this variable will be filled with the number of
* replacements done.
* @param-out int $count
*
* @return string|array|string[] preg_replace returns an array if the
* subject parameter is an array, or a string
* otherwise.
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
Loading