mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 18:41:47 +00:00
Fixed PHPStan complaints
This commit is contained in:
parent
6f8f460a6c
commit
f239b077b9
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\console;
|
namespace pocketmine\console;
|
||||||
|
|
||||||
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use function fclose;
|
use function fclose;
|
||||||
use function fgets;
|
use function fgets;
|
||||||
use function fopen;
|
use function fopen;
|
||||||
@ -44,7 +45,9 @@ final class ConsoleReader{
|
|||||||
fclose($this->stdin);
|
fclose($this->stdin);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->stdin = fopen("php://stdin", "r");
|
$stdin = fopen("php://stdin", "r");
|
||||||
|
if($stdin === false) throw new AssumptionFailedError("Opening stdin should never fail");
|
||||||
|
$this->stdin = $stdin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -505,6 +505,11 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/command/defaults/TimingsCommand.php
|
path: ../../../src/command/defaults/TimingsCommand.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
||||||
|
count: 2
|
||||||
|
path: ../../../src/console/ConsoleReader.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user