diff --git a/generator/phpstan.neon b/generator/phpstan.neon index 0dcbf845..7e13935f 100644 --- a/generator/phpstan.neon +++ b/generator/phpstan.neon @@ -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 diff --git a/generator/src/PhpStanFunctions/PhpStanType.php b/generator/src/PhpStanFunctions/PhpStanType.php index 401ca8ec..dfe8b0b2 100644 --- a/generator/src/PhpStanFunctions/PhpStanType.php +++ b/generator/src/PhpStanFunctions/PhpStanType.php @@ -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 = ''; diff --git a/lib/special_cases.php b/lib/special_cases.php index 71159d8f..53244e45 100644 --- a/lib/special_cases.php +++ b/lib/special_cases.php @@ -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. diff --git a/phpstan.neon b/phpstan.neon index 73518de6..7259e86f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,7 @@ +includes: + - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon + - phar://phpstan.phar/conf/bleedingEdge.neon + parameters: paths: - ./lib @@ -5,5 +9,3 @@ parameters: 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