Skip to content

Commit

Permalink
Fix Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed May 5, 2023
1 parent f8e96c7 commit e4d211b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
strictBinaryOperands="true"
ignoreInternalFunctionFalseReturn="false"
ignoreInternalFunctionNullReturn="false"
hideExternalErrors="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd">
Expand All @@ -16,6 +19,7 @@

<issueHandlers>
<MixedAssignment errorLevel="suppress"/>
<RedundantCastGivenDocblockType errorLevel="suppress"/>

<PropertyNotSetInConstructor>
<errorLevel type="suppress">
Expand Down
1 change: 1 addition & 0 deletions src/PackageManager/PackageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ public function scriptCmd(string $command, array $env = []): ?string
// then we remove `--`.
$cmdParams = '';
if (substr_count($command, ' -- ', 1) === 1) {
/** @psalm-suppress PossiblyUndefinedArrayOffset */
[$commandNoArgs, $cmdParams] = explode(' -- ', $command, 2);
$commandNoArgsClean = trim($commandNoArgs);
if ($commandNoArgsClean) {
Expand Down
1 change: 0 additions & 1 deletion src/Util/ArchiveDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public function download(PackageInterface $package, string $path): bool
// download there, or Composer will delete every existing file in it.
// So we first unpack in a temporary folder and then move unpacked files from the temp
// dir to final target dir. That's surely slower, but necessary.

$tempDir = dirname($path) . '/.tmp' . (string)substr(md5(uniqid($path, true)), 0, 8);
$this->io->writeVerbose(
"Archive target path '{$path}' is an existing directory.",
Expand Down

0 comments on commit e4d211b

Please sign in to comment.