Skip to content

Commit

Permalink
Merge pull request #229 from IanDelMar/register-hookdocblock
Browse files Browse the repository at this point in the history
Register `HookDocBlock` as service
  • Loading branch information
szepeviktor authored Jun 28, 2024
2 parents 65ac330 + 90f10e1 commit 91ca166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
services:
-
class: SzepeViktor\PHPStan\WordPress\HookDocBlock
-
class: SzepeViktor\PHPStan\WordPress\WpThemeGetDynamicMethodReturnTypeExtension
tags:
Expand Down
5 changes: 2 additions & 3 deletions src/ApplyFiltersDynamicFunctionReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Type\FileTypeMapper;
use PHPStan\Type\MixedType;
use PHPStan\Type\Type;

Expand All @@ -20,9 +19,9 @@ class ApplyFiltersDynamicFunctionReturnTypeExtension implements \PHPStan\Type\Dy
/** @var \SzepeViktor\PHPStan\WordPress\HookDocBlock */
protected $hookDocBlock;

public function __construct(FileTypeMapper $fileTypeMapper)
public function __construct(HookDocBlock $hookDocBlock)
{
$this->hookDocBlock = new HookDocBlock($fileTypeMapper);
$this->hookDocBlock = $hookDocBlock;
}

public function isFunctionSupported(FunctionReflection $functionReflection): bool
Expand Down

0 comments on commit 91ca166

Please sign in to comment.