Closed
Description
I recently noticed this probable bug - phpcs analyzes the following snippet...
Debugger::getBar()->addPanel($this->objectFactory->make(DumperPanel::class, [
'title' => 'SESS',
'data' => \array_filter($_SESSION, /** @psalm-suppress MissingClosureParamType */ function (/** @noinspection PhpUnusedParameterInspection */ $value, string $key): bool {
return $key !== 'user_password';
}, ARRAY_FILTER_USE_BOTH)
]));
... and removes the leading /**
of the second inline annotation, thus making the code invalid:
Debugger::getBar()->addPanel($this->objectFactory->make(DumperPanel::class, [
'title' => 'SESS',
'data' => \array_filter($_SESSION, /** @psalm-suppress MissingClosureParamType */ function (@noinspection PhpUnusedParameterInspection */ $value, string $key): bool {
return $key !== 'user_password';
}, ARRAY_FILTER_USE_BOTH)
]));
Unfortunately, I have not had time to analyze this in any more detail, so that I'm providing the full code snippets instead of simplifying the code beforehand.
Metadata
Metadata
Assignees
Labels
No labels