Skip to content

Commit

Permalink
Minor phpstan related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed Nov 22, 2021
1 parent f3573bd commit 780a65a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ parameters:
processTimeout: 300.0
ignoreErrors:
- '#does not accept default value of type string#'
excludes_analyse:
- '#Access to an undefined property#'
excludePaths:
- 'tests/Fixtures/*'

7 changes: 0 additions & 7 deletions src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ class Analysis
*/
public $context;

/**
* Registry for the post-processing operations.
*
* @var callable[]
*/
private static $processors;

public function __construct(array $annotations = [], Context $context = null)
{
$this->annotations = new \SplObjectStorage();
Expand Down
10 changes: 4 additions & 6 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,11 @@ public function removeProcessor(callable $processor, bool $silent = false): Gene
*/
public function updateProcessor(callable $processor, ?callable $matcher = null): Generator
{
if (!$matcher) {
$matcher = $matcher ?: function ($other) use ($processor) {
$otherClass = get_class($other);
$matcher = $matcher ?: function ($other) use ($processor) {
$otherClass = get_class($other);

return $processor instanceof $otherClass;
};
}
return $processor instanceof $otherClass;
};

$processors = array_map(function ($other) use ($processor, $matcher) {
return $matcher($other) ? $processor : $other;
Expand Down

0 comments on commit 780a65a

Please sign in to comment.