mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fixes from PHPStan (#7687)
* fix docblocks * remove redundant conditional * fix wrong variable name * fix wrong namespaces * add missing private members * remove unused/redundant arguments * move testcase class * exclude TestCase.php * Tweak RuleWatchGraph type hints * Tweak doc comment
This commit is contained in:
parent
38a34159ef
commit
2a13bb2649
86 changed files with 163 additions and 166 deletions
|
@ -13,7 +13,7 @@
|
|||
namespace Composer\Test\Repository;
|
||||
|
||||
use Composer\Repository\ArtifactRepository;
|
||||
use Composer\TestCase;
|
||||
use Composer\Test\TestCase;
|
||||
use Composer\IO\NullIO;
|
||||
use Composer\Config;
|
||||
use Composer\Package\BasePackage;
|
||||
|
@ -42,7 +42,7 @@ class ArtifactRepositoryTest extends TestCase
|
|||
);
|
||||
|
||||
$coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts');
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO());
|
||||
|
||||
$foundPackages = array_map(function (BasePackage $package) {
|
||||
return "{$package->getPrettyName()}-{$package->getPrettyVersion()}";
|
||||
|
@ -58,7 +58,7 @@ class ArtifactRepositoryTest extends TestCase
|
|||
{
|
||||
$absolutePath = __DIR__ . '/Fixtures/artifacts';
|
||||
$coordinates = array('type' => 'artifact', 'url' => $absolutePath);
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO());
|
||||
|
||||
foreach ($repo->getPackages() as $package) {
|
||||
$this->assertSame(strpos($package->getDistUrl(), strtr($absolutePath, '\\', '/')), 0);
|
||||
|
@ -69,7 +69,7 @@ class ArtifactRepositoryTest extends TestCase
|
|||
{
|
||||
$relativePath = 'tests/Composer/Test/Repository/Fixtures/artifacts';
|
||||
$coordinates = array('type' => 'artifact', 'url' => $relativePath);
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
|
||||
$repo = new ArtifactRepository($coordinates, new NullIO());
|
||||
|
||||
foreach ($repo->getPackages() as $package) {
|
||||
$this->assertSame(strpos($package->getDistUrl(), $relativePath), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue