Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jul 25, 2024
1 parent 2846b29 commit 5b4cba4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ public function start(
PhpParser\Node\FunctionLike $stmt,
bool $fake_method = false,
PhpParser\Comment\Doc $doc_comment = null
)
{
) {
if ($stmt instanceof PhpParser\Node\Expr\Closure
|| $stmt instanceof PhpParser\Node\Expr\ArrowFunction
) {
Expand Down
9 changes: 7 additions & 2 deletions src/Psalm/Plugin/EventHandler/Event/AddRemoveTaintsEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Psalm\Plugin\EventHandler\Event;

use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr;
use Psalm\Codebase;
use Psalm\Context;
Expand All @@ -17,10 +18,11 @@ final class AddRemoveTaintsEvent
/**
* Called after an expression has been checked
*
* @param ArrayItem|Expr $expr
* @internal
*/
public function __construct(
Expr $expr,
$expr,
Context $context,
StatementsSource $statements_source,
Codebase $codebase
Expand All @@ -31,7 +33,10 @@ public function __construct(
$this->codebase = $codebase;
}

public function getExpr(): Expr
/**
* @return ArrayItem|Expr
*/
public function getExpr()
{
return $this->expr;
}
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/SuicidalAutoloader/autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'PHPUnit\Framework\DOMElement',
'Stringable',
'AllowDynamicProperties',
'PhpParser\Node\Stmt\Throw', // BCHelper for nikic/php-parser v4/5

// https://github.com/symfony/symfony/pull/40203
// these are actually functions, referenced as `if (!function_exists(u::class))`
Expand Down

0 comments on commit 5b4cba4

Please sign in to comment.