Skip to content

Commit

Permalink
Ignore false-positive int overflow errors occurring only on 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
herndlm authored and ondrejmirtes committed Jan 30, 2022
1 parent 01a0d58 commit da80c29
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/baseline-32bit.neon
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$value of class PHPStan\\\\Type\\\\Constant\\\\ConstantIntegerType constructor expects int, float given\\.$#"
count: 2
path: ../src/Analyser/MutatingScope.php
11 changes: 11 additions & 0 deletions build/ignore-by-architecture.neon.php
@@ -0,0 +1,11 @@
<?php declare(strict_types = 1);

use PHPStan\DependencyInjection\NeonAdapter;

$adapter = new NeonAdapter();

if (PHP_INT_SIZE === 4) {
return $adapter->load(__DIR__ . '/baseline-32bit.neon');
}

return [];
1 change: 1 addition & 0 deletions build/phpstan.neon
Expand Up @@ -8,6 +8,7 @@ includes:
- ../conf/bleedingEdge.neon
- ../phpstan-baseline.neon
- ignore-by-php-version.neon.php
- ignore-by-architecture.neon.php
parameters:
level: 8
paths:
Expand Down

0 comments on commit da80c29

Please sign in to comment.