Skip to content

Commit

Permalink
Merge pull request #10904 from danog/fix_trait_analysis
Browse files Browse the repository at this point in the history
Fix trait analysis
  • Loading branch information
danog committed Apr 11, 2024
2 parents ef3b018 + 4f1bfa4 commit 08afc45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Psalm/Internal/Analyzer/TraitAnalyzer.php
Expand Up @@ -24,7 +24,6 @@ public function __construct(
) {
$this->source = $source;
$this->file_analyzer = $source->getFileAnalyzer();
$this->aliases = $source->getAliases();
$this->class = $class;
$this->fq_class_name = $fq_class_name;
$codebase = $source->getCodebase();
Expand Down
4 changes: 3 additions & 1 deletion src/Psalm/Internal/Fork/PsalmRestarter.php
Expand Up @@ -10,6 +10,7 @@
use function array_merge;
use function array_splice;
use function assert;
use function count;
use function defined;
use function extension_loaded;
use function file_get_contents;
Expand Down Expand Up @@ -140,7 +141,7 @@ private static function toBytes(string $value): int
/**
* No type hint to allow xdebug-handler v1 and v2 usage
*
* @param string[] $command
* @param non-empty-list<string> $command
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
*/
protected function restart($command): void
Expand Down Expand Up @@ -178,6 +179,7 @@ protected function restart($command): void
0,
$additional_options,
);
assert(count($command) > 0);

parent::restart($command);
}
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/SuicidalAutoloader/autoloader.php
Expand Up @@ -10,6 +10,7 @@
Transliterator::class, // symfony/string
InstalledVersions::class, // composer v2
'Mockery\Closure', // Mockery/mockery 1.6.1
'Mockery\Matcher\TExpected', // Mockery/mockery, invalid template usage
'parent', // it's unclear why Psalm tries to autoload parent
'PHPUnit\Framework\ArrayAccess',
'PHPUnit\Framework\Countable',
Expand Down

0 comments on commit 08afc45

Please sign in to comment.