Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 17, 2024
1 parent a5b04a9 commit ba1024d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- 'phpunit.xml.dist'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,4 +30,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.0', '8.1', '8.2', '8.3']
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"rector/rector": "^1.0",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.1",
"vimeo/psalm": "^4.30|^5.22",
"yiisoft/aliases": "^3.0",
"yiisoft/psr-dummy-provider": "^1.0",
"yiisoft/test-support": "^3.0"
Expand Down
6 changes: 6 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
</issueHandlers>
</psalm>
4 changes: 2 additions & 2 deletions src/ViewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use function str_replace;

/**
* ViewRenderer allows using Twig with a View service.
* `ViewRenderer` allows using Twig with a View service.
*/
final class ViewRenderer implements TemplateRendererInterface
{
Expand All @@ -42,7 +42,7 @@ public function render(ViewInterface $view, string $template, array $parameters)
ob_implicit_flush(false);

Check warning on line 42 in src/ViewRenderer.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ }; $obInitialLevel = ob_get_level(); ob_start(); - ob_implicit_flush(false); + ob_implicit_flush(true); try { /** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */ $renderer->bindTo($view)();

Check warning on line 42 in src/ViewRenderer.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ }; $obInitialLevel = ob_get_level(); ob_start(); - ob_implicit_flush(false); + try { /** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */ $renderer->bindTo($view)();

Check warning on line 42 in src/ViewRenderer.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ }; $obInitialLevel = ob_get_level(); ob_start(); - ob_implicit_flush(false); + ob_implicit_flush(true); try { /** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */ $renderer->bindTo($view)();

Check warning on line 42 in src/ViewRenderer.php

View workflow job for this annotation

GitHub Actions / mutation / PHP 8.1-ubuntu-latest

Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ }; $obInitialLevel = ob_get_level(); ob_start(); - ob_implicit_flush(false); + try { /** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */ $renderer->bindTo($view)();

try {
/** @psalm-suppress PossiblyInvalidFunctionCall */
/** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */
$renderer->bindTo($view)();
return ob_get_clean();
} catch (Throwable $e) {
Expand Down

0 comments on commit ba1024d

Please sign in to comment.