Skip to content

Commit 0d9d3b3

Browse files
committed
Fixing new static analysis updates
1 parent decf607 commit 0d9d3b3

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: '#^Call to function is_string\(\) with non\-empty\-string will always evaluate to true\.$#'
5-
identifier: function.alreadyNarrowedType
6-
count: 1
7-
path: src/Command/CommandHelper.php
8-
93
-
104
message: '#^Cannot cast mixed to int\.$#'
115
identifier: cast.int
@@ -60,18 +54,6 @@ parameters:
6054
count: 1
6155
path: src/ComposerIntegration/PieComposerInstaller.php
6256

63-
-
64-
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
65-
identifier: function.alreadyNarrowedType
66-
count: 1
67-
path: src/ComposerIntegration/QuieterConsoleIO.php
68-
69-
-
70-
message: '#^Strict comparison using \!\=\= between Closure\(Composer\\IO\\ConsoleIO\)\: void and null will always evaluate to true\.$#'
71-
identifier: notIdentical.alwaysTrue
72-
count: 1
73-
path: src/ComposerIntegration/QuieterConsoleIO.php
74-
7557
-
7658
message: '#^Cannot cast mixed to string\.$#'
7759
identifier: cast.string

src/SelfManage/BuildTools/BinaryBuildToolFinder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Symfony\Component\Process\ExecutableFinder;
1010

1111
use function array_key_exists;
12-
use function assert;
1312
use function implode;
1413
use function is_array;
1514
use function Safe\preg_replace;
@@ -54,10 +53,7 @@ public function packageNameFor(PackageManager $packageManager, TargetPlatform $t
5453
}
5554

5655
if ($this->packageManagerPackages[$packageManager->value] === '{php-config-path}') {
57-
$phpConfigPath = preg_replace('((.*)php)', '$1php-config', $targetPlatform->phpBinaryPath->phpBinaryPath);
58-
assert($phpConfigPath !== '');
59-
60-
return $phpConfigPath;
56+
return preg_replace('((.*)php)', '$1php-config', $targetPlatform->phpBinaryPath->phpBinaryPath);
6157
}
6258

6359
// If we need to customise specific package names depending on OS

0 commit comments

Comments
 (0)