1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Update PHPStan (#11976)

* Update PHPStan

* Update inline ignores to `@phpstan-ignore` with error identifier
This commit is contained in:
Ondřej Mirtes 2024-05-22 09:09:04 +02:00 committed by GitHub
parent d4b071bd1e
commit 5bb30ca170
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 84 additions and 85 deletions

View file

@ -160,7 +160,7 @@ class PluginInstallerTest extends TestCase
$installer->install($this->repository, $this->packages[0]);
$plugins = $this->pm->getPlugins();
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore-line
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals(
'activate v1'.PHP_EOL,
$this->io->getOutput()
@ -186,7 +186,7 @@ class PluginInstallerTest extends TestCase
'activate v1'.PHP_EOL,
$this->io->getOutput()
);
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore-line
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
}
public function testInstallMultiplePlugins(): void
@ -201,10 +201,10 @@ class PluginInstallerTest extends TestCase
$installer->install($this->repository, $this->packages[3]);
$plugins = $this->pm->getPlugins();
$this->assertEquals('plugin1', $plugins[0]->name); // @phpstan-ignore-line
$this->assertEquals('installer-v4', $plugins[0]->version); // @phpstan-ignore-line
$this->assertEquals('plugin2', $plugins[1]->name); // @phpstan-ignore-line
$this->assertEquals('installer-v4', $plugins[1]->version); // @phpstan-ignore-line
$this->assertEquals('plugin1', $plugins[0]->name); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('installer-v4', $plugins[0]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('plugin2', $plugins[1]->name); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('installer-v4', $plugins[1]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('activate v4-plugin1'.PHP_EOL.'activate v4-plugin2'.PHP_EOL, $this->io->getOutput());
}
@ -225,7 +225,7 @@ class PluginInstallerTest extends TestCase
$plugins = $this->pm->getPlugins();
$this->assertCount(1, $plugins);
$this->assertEquals('installer-v2', $plugins[1]->version); // @phpstan-ignore-line
$this->assertEquals('installer-v2', $plugins[1]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('activate v1'.PHP_EOL.'deactivate v1'.PHP_EOL.'activate v2'.PHP_EOL, $this->io->getOutput());
}
@ -265,7 +265,7 @@ class PluginInstallerTest extends TestCase
$installer->update($this->repository, $this->packages[1], $this->packages[2]);
$plugins = $this->pm->getPlugins();
$this->assertEquals('installer-v3', $plugins[1]->version); // @phpstan-ignore-line
$this->assertEquals('installer-v3', $plugins[1]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('activate v2'.PHP_EOL.'deactivate v2'.PHP_EOL.'activate v3'.PHP_EOL, $this->io->getOutput());
}
@ -283,7 +283,7 @@ class PluginInstallerTest extends TestCase
$plugins = $this->pm->getPlugins();
$this->assertCount(1, $plugins);
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore-line
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore staticMethod.dynamicCall, property.notFound
$this->assertEquals('activate v1'.PHP_EOL, $this->io->getOutput());
}