Skip to content

Commit

Permalink
Added fixes for phpstan tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxwilko committed Aug 8, 2023
1 parent 0ef9e3c commit 2d27b1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
parameters:
reportUnmatchedIgnoredErrors: false
level: 5
paths:
- src
ignoreErrors:
- message: '#Access to an undefined property.*?\$expr#'
path: src/ArrayFile.php
1 change: 1 addition & 0 deletions src/ArrayFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public function set($key, $value = null)
if ($target->value->name->parts[0] !== 'env' || !isset($target->value->args[0])) {
return $this;
}
/* @phpstan-ignore-next-line */
if (isset($target->value->args[0]) && !isset($target->value->args[1])) {
$target->value->args[1] = new Arg($this->makeAstNode($valueType, $value));
}
Expand Down
2 changes: 1 addition & 1 deletion src/DataFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class DataFile implements DataFileInterface
/**
* Abstract syntax tree
*
* @var \PhpParser\Node\Stmt[]|array<int, array>
* @var mixed
*/
protected $ast = [];

Expand Down

0 comments on commit 2d27b1d

Please sign in to comment.