Skip to content

Commit ebd96a5

Browse files
committed
update psalm
1 parent 7d67bb7 commit ebd96a5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.phive/phars.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
33
<phar name="phpstan" version="2.0.1" installed="2.0.1" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="5.14.1" installed="5.14.1" location="./tools/psalm" copy="false"/>
4+
<phar name="psalm" version="5.26.1" installed="5.26.1" location="./tools/psalm" copy="false"/>
55
</phive>

src/Command/DumpSqlCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function execute(Arguments $args, ConsoleIo $io): int
8989
if ($gzip) {
9090
if (function_exists('gzencode')) {
9191
$result = gzencode($result, 9);
92-
if (!$result) {
92+
if ($result === false) {
9393
$io->err('Failed to gzip the dump!');
9494

9595
return self::CODE_ERROR;

src/Sql/SqlBase.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ protected function checkBinary(string $command): bool
6565
{
6666
$windows = str_starts_with(PHP_OS, 'WIN');
6767
$test = $windows ? 'where' : 'command -v';
68+
$commandResult = shell_exec("$test $command");
69+
if ($commandResult === null || $commandResult === false) {
70+
return false;
71+
}
6872

69-
return is_executable(trim(shell_exec("$test $command") ?: ''));
73+
return is_executable(trim($commandResult));
7074
}
7175
}

0 commit comments

Comments
 (0)