update phpstan

This commit is contained in:
Yuri Kuznetsov
2024-09-03 10:34:48 +03:00
parent cea04482c7
commit 3c883e805e
6 changed files with 16 additions and 16 deletions

View File

@@ -277,8 +277,7 @@ class DefaultAssignmentChecker implements AssignmentChecker
if ($entity->isAttributeChanged(self::ATTR_ASSIGNED_USERS_IDS)) {
$toProcess = true;
}
}
else {
} else {
$toProcess = true;
}
@@ -304,6 +303,7 @@ class DefaultAssignmentChecker implements AssignmentChecker
return $this->isPermittedAssignedUsersLevelTeam($user, $entity);
}
/** @phpstan-ignore-next-line */
return true;
}

View File

@@ -160,7 +160,11 @@ class Manager
fwrite($resource, $contents);
$path = stream_get_meta_data($resource)['uri'];
$path = stream_get_meta_data($resource)['uri'] ?? null;
if (!$path) {
throw new RuntimeException("No uri.");
}
// To prevent deleting.
$this->resourceMap[$path] = $resource;

View File

@@ -294,7 +294,7 @@ class Metadata
$unsetList = $unsets;
foreach ($unsetList as $unsetItem) {
if (preg_match('/fields\.([^.]+)/', $unsetItem, $matches) && isset($matches[1])) {
if (preg_match('/fields\.([^.]+)/', $unsetItem, $matches)) {
$fieldName = $matches[1];
$fieldPath = [$key1, $key2, 'fields', $fieldName];

View File

@@ -49,7 +49,7 @@ class System
}
return strtolower(
trim($match[1])
trim($match[1]) /** @phpstan-ignore-line */
);
}

View File

@@ -56,7 +56,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.10"
"phpstan/phpstan": "^1.12"
},
"suggest": {
"ext-pdo_mysql": "*",

16
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ec45187cd1774562b435c8a589aeeee6",
"content-hash": "ca1dc00c70f187b1a40064861bd7a8e7",
"packages": [
{
"name": "async-aws/core",
@@ -7404,16 +7404,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.10.57",
"version": "1.12.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "1627b1d03446904aaa77593f370c5201d2ecc34e"
"reference": "384af967d35b2162f69526c7276acadce534d0e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e",
"reference": "1627b1d03446904aaa77593f370c5201d2ecc34e",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1",
"reference": "384af967d35b2162f69526c7276acadce534d0e1",
"shasum": ""
},
"require": {
@@ -7456,13 +7456,9 @@
{
"url": "https://github.com/phpstan",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2024-01-24T11:51:34+00:00"
"time": "2024-08-27T09:18:05+00:00"
},
{
"name": "phpunit/php-code-coverage",