Skip to content

Commit

Permalink
Update psalm (#172)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
  • Loading branch information
dependabot[bot] and vjik committed Jun 20, 2023
1 parent 4442055 commit 80937be
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Expand Up @@ -28,4 +28,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.0', '8.1', '8.2']
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -26,7 +26,7 @@
"rector/rector": "^0.17.0",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.18",
"vimeo/psalm": "^4.30|^5.4",
"yiisoft/test-support": "^1.3"
},
"autoload": {
Expand Down
10 changes: 6 additions & 4 deletions psalm.xml
@@ -1,21 +1,23 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
resolveFromConfigFile="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"
>
<projectFiles>
<directory name="src" />
<directory name="src"/>
<ignoreFiles>
<directory name="vendor" />
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress"/>
<InvalidCatch>
<errorLevel type="suppress">
<referencedClass name="Psr\Container\NotFoundExceptionInterface" />
<referencedClass name="Psr\Container\NotFoundExceptionInterface"/>
</errorLevel>
</InvalidCatch>
</issueHandlers>
Expand Down
1 change: 0 additions & 1 deletion src/Factory.php
Expand Up @@ -63,7 +63,6 @@ public function withDefinitions(array $definitions): self
private function validateDefinitions(array $definitions): void
{
if ($this->validate) {
/** @var mixed $definition */
foreach ($definitions as $id => $definition) {
DefinitionValidator::validate($definition, $id);
}
Expand Down
1 change: 0 additions & 1 deletion src/FactoryInternalContainer.php
Expand Up @@ -88,7 +88,6 @@ public function create(DefinitionInterface $definition): mixed
}

try {

Check warning on line 90 in src/FactoryInternalContainer.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ if ($definition instanceof ArrayDefinition) { $this->creatingIds[$definition->getClass()] = 1; } - try { - $result = $definition->resolve($this); - return is_object($result) ? clone $result : $result; - } finally { - if ($definition instanceof ArrayDefinition) { - unset($this->creatingIds[$definition->getClass()]); - } + $result = $definition->resolve($this); + return is_object($result) ? clone $result : $result; + if ($definition instanceof ArrayDefinition) { + unset($this->creatingIds[$definition->getClass()]); } } /**
/** @var mixed $result */
$result = $definition->resolve($this);
return is_object($result) ? clone $result : $result;
} finally {
Expand Down

0 comments on commit 80937be

Please sign in to comment.