mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
phpstan 0.12.58
This commit is contained in:
parent
3709ba172b
commit
215bac8dd7
@ -38,7 +38,7 @@
|
|||||||
"composer-runtime-api": "^2.0"
|
"composer-runtime-api": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "0.12.57",
|
"phpstan/phpstan": "0.12.58",
|
||||||
"phpstan/phpstan-phpunit": "^0.12.6",
|
"phpstan/phpstan-phpunit": "^0.12.6",
|
||||||
"phpstan/phpstan-strict-rules": "^0.12.2",
|
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||||
"phpunit/phpunit": "^9.2"
|
"phpunit/phpunit": "^9.2"
|
||||||
|
14
composer.lock
generated
14
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "da01dc4097df12e4b124207d071b81f4",
|
"content-hash": "6e254dbfde069aa358d41f88a9ea7f1e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/json-comment",
|
"name": "adhocore/json-comment",
|
||||||
@ -996,16 +996,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "0.12.57",
|
"version": "0.12.58",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b"
|
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||||
"reference": "f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b",
|
"reference": "2a4847df6047b30af28854ed9dc95304cdb56ae5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1036,7 +1036,7 @@
|
|||||||
"description": "PHPStan - PHP Static Analysis Tool",
|
"description": "PHPStan - PHP Static Analysis Tool",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.57"
|
"source": "https://github.com/phpstan/phpstan/tree/0.12.58"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1052,7 +1052,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-11-21T12:53:28+00:00"
|
"time": "2020-11-29T13:32:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan-phpunit",
|
"name": "phpstan/phpstan-phpunit",
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\permission;
|
namespace pocketmine\permission;
|
||||||
|
|
||||||
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use function array_shift;
|
use function array_shift;
|
||||||
use function count;
|
use function count;
|
||||||
use function explode;
|
use function explode;
|
||||||
@ -145,7 +146,9 @@ class BanEntry{
|
|||||||
private static function parseDate(string $date) : \DateTime{
|
private static function parseDate(string $date) : \DateTime{
|
||||||
$datetime = \DateTime::createFromFormat(self::$format, $date);
|
$datetime = \DateTime::createFromFormat(self::$format, $date);
|
||||||
if(!($datetime instanceof \DateTime)){
|
if(!($datetime instanceof \DateTime)){
|
||||||
throw new \RuntimeException("Error parsing date for BanEntry: " . implode(", ", \DateTime::getLastErrors()["errors"]));
|
$lastErrors = \DateTime::getLastErrors();
|
||||||
|
if($lastErrors === false) throw new AssumptionFailedError("DateTime::getLastErrors() should not be returning false in here");
|
||||||
|
throw new \RuntimeException("Error parsing date for BanEntry: " . implode(", ", $lastErrors["errors"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $datetime;
|
return $datetime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user