Skip to content

Commit

Permalink
Fix: Run 'make php-cs-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Oct 20, 2020
1 parent da9810f commit 8172b9a
Show file tree
Hide file tree
Showing 44 changed files with 241 additions and 241 deletions.
36 changes: 18 additions & 18 deletions tests/AstRunner/AstMapFlattenGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,30 @@ public function testBasicInheritance(): void
{
$astMap = $this->getAstMap('FixtureBasicInheritance');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceA::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceB::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))'],
$this->getInheritedInherits(FixtureBasicInheritanceC::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends))',
],
$this->getInheritedInherits(FixtureBasicInheritanceD::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceA::6 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceD::9 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceB::7 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceD::9 (Extends) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceC::8 (Extends))',
Expand All @@ -106,30 +106,30 @@ public function testBasicInheritanceInterfaces(): void
{
$astMap = $this->getAstMap('FixtureBasicInheritanceInterfaces');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceInterfaceA::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceInterfaceB::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))'],
$this->getInheritedInherits(FixtureBasicInheritanceInterfaceC::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements))',
],
$this->getInheritedInherits(FixtureBasicInheritanceInterfaceD::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceA::6 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceD::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceB::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceD::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceInterfaceC::8 (Implements))',
Expand All @@ -143,30 +143,30 @@ public function testBasicMultipleInheritanceInterfaces(): void
{
$astMap = $this->getAstMap('MultipleInheritanceInterfaces');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(MultipleInteritanceA1::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(MultipleInteritanceA2::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(MultipleInteritanceA::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA2::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))',
],
$this->getInheritedInherits(MultipleInteritanceB::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::7 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceB::9 (Implements) -> Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA::8 (Implements))',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceA1::8 (Implements) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\MultipleInteritanceB::9 (Implements))',
Expand All @@ -181,17 +181,17 @@ public function testBasicMultipleInheritanceWithNoise(): void
{
$astMap = $this->getAstMap('FixtureBasicInheritanceWithNoise');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceWithNoiseA::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritedInherits(FixtureBasicInheritanceWithNoiseB::class, $astMap)
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceWithNoiseA::18 (Extends) (path: Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\FixtureBasicInheritanceWithNoiseB::19 (Extends))'],
$this->getInheritedInherits(FixtureBasicInheritanceWithNoiseC::class, $astMap)
);
Expand Down
16 changes: 8 additions & 8 deletions tests/AstRunner/AstMapGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public function testBasicDependencyClass(): void
{
$astMap = $this->getAstMap(__DIR__.'/Fixtures/BasicDependency/BasicDependencyClass.php');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassA::9 (Extends)',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceA::9 (Implements)',
],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyClassB::class)))
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceA::13 (Implements)',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyClassInterfaceB::13 (Implements)',
Expand All @@ -75,30 +75,30 @@ public function testBasicTraitsClass(): void
{
$astMap = $this->getAstMap(__DIR__.'/Fixtures/BasicDependency/BasicDependencyTraits.php');

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitA::class)))
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitB::class)))
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitB::7 (Uses)'],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitC::class)))
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
[
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitA::10 (Uses)',
'Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitB::11 (Uses)',
],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitD::class)))
);

static::assertArrayValuesEquals(
self::assertArrayValuesEquals(
['Tests\SensioLabs\Deptrac\AstRunner\Visitor\Fixtures\BasicDependency\BasicDependencyTraitA::15 (Uses)'],
$this->getInheritsAsString($astMap->getClassReferenceByClassName(ClassLikeName::fromFQCN(BasicDependencyTraitClass::class)))
);
Expand All @@ -108,7 +108,7 @@ public function testIssue319(): void
{
$astMap = $this->getAstMap(__DIR__.'/Fixtures/Issue319.php');

static::assertSame(
self::assertSame(
[
'Foo\Exception',
'Foo\RuntimeException',
Expand Down
54 changes: 27 additions & 27 deletions tests/AstRunner/Resolver/AnnotationDependencyResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,56 +31,56 @@ public function testPropertyDependencyResolving(): void
$astClassReferences = $astFileReference->getAstClassReferences();
$annotationDependency = $astClassReferences[0]->getDependencies();

static::assertCount(2, $astClassReferences);
static::assertCount(7, $annotationDependency);
static::assertCount(0, $astClassReferences[1]->getDependencies());
self::assertCount(2, $astClassReferences);
self::assertCount(7, $annotationDependency);
self::assertCount(0, $astClassReferences[1]->getDependencies());

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild',
$annotationDependency[0]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[0]->getFileOccurrence()->getFilepath());
static::assertSame(9, $annotationDependency[0]->getFileOccurrence()->getLine());
static::assertSame('variable', $annotationDependency[0]->getType());
self::assertSame($filePath, $annotationDependency[0]->getFileOccurrence()->getFilepath());
self::assertSame(9, $annotationDependency[0]->getFileOccurrence()->getLine());
self::assertSame('variable', $annotationDependency[0]->getType());

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild',
$annotationDependency[1]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[1]->getFileOccurrence()->getFilepath());
static::assertSame(23, $annotationDependency[1]->getFileOccurrence()->getLine());
static::assertSame('variable', $annotationDependency[1]->getType());
self::assertSame($filePath, $annotationDependency[1]->getFileOccurrence()->getFilepath());
self::assertSame(23, $annotationDependency[1]->getFileOccurrence()->getLine());
self::assertSame('variable', $annotationDependency[1]->getType());

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild',
$annotationDependency[2]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[2]->getFileOccurrence()->getFilepath());
static::assertSame(26, $annotationDependency[2]->getFileOccurrence()->getLine());
static::assertSame('variable', $annotationDependency[2]->getType());
self::assertSame($filePath, $annotationDependency[2]->getFileOccurrence()->getFilepath());
self::assertSame(26, $annotationDependency[2]->getFileOccurrence()->getLine());
self::assertSame('variable', $annotationDependency[2]->getType());

static::assertSame(
self::assertSame(
'Symfony\Component\Console\Exception\RuntimeException',
$annotationDependency[3]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[3]->getFileOccurrence()->getFilepath());
static::assertSame(29, $annotationDependency[3]->getFileOccurrence()->getLine());
static::assertSame('variable', $annotationDependency[3]->getType());
self::assertSame($filePath, $annotationDependency[3]->getFileOccurrence()->getFilepath());
self::assertSame(29, $annotationDependency[3]->getFileOccurrence()->getLine());
self::assertSame('variable', $annotationDependency[3]->getType());

static::assertSame(
self::assertSame(
'Symfony\Component\Finder\SplFileInfo',
$annotationDependency[4]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[4]->getFileOccurrence()->getFilepath());
static::assertSame(14, $annotationDependency[4]->getFileOccurrence()->getLine());
static::assertSame('parameter', $annotationDependency[4]->getType());
self::assertSame($filePath, $annotationDependency[4]->getFileOccurrence()->getFilepath());
self::assertSame(14, $annotationDependency[4]->getFileOccurrence()->getLine());
self::assertSame('parameter', $annotationDependency[4]->getType());

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\Integration\fixtures\AnnotationDependencyChild',
$annotationDependency[5]->getClassLikeName()->toString()
);
static::assertSame($filePath, $annotationDependency[5]->getFileOccurrence()->getFilepath());
static::assertSame(14, $annotationDependency[5]->getFileOccurrence()->getLine());
static::assertSame('returntype', $annotationDependency[5]->getType());
self::assertSame($filePath, $annotationDependency[5]->getFileOccurrence()->getFilepath());
self::assertSame(14, $annotationDependency[5]->getFileOccurrence()->getLine());
self::assertSame('returntype', $annotationDependency[5]->getType());
}
}
24 changes: 12 additions & 12 deletions tests/AstRunner/Resolver/AnonymousClassResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ public function testPropertyDependencyResolving(): void

$astClassReferences = $astFileReference->getAstClassReferences();

static::assertCount(3, $astClassReferences);
static::assertCount(0, $astClassReferences[0]->getDependencies());
static::assertCount(0, $astClassReferences[1]->getDependencies());
static::assertCount(2, $astClassReferences[2]->getDependencies());
self::assertCount(3, $astClassReferences);
self::assertCount(0, $astClassReferences[0]->getDependencies());
self::assertCount(0, $astClassReferences[1]->getDependencies());
self::assertCount(2, $astClassReferences[2]->getDependencies());

$dependencies = $astClassReferences[2]->getDependencies();

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\AstRunner\Resolver\fixtures\ClassA',
$dependencies[0]->getClassLikeName()->toString()
);
static::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath());
static::assertSame(19, $dependencies[0]->getFileOccurrence()->getLine());
static::assertSame('anonymous_class_extends', $dependencies[0]->getType());
self::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath());
self::assertSame(19, $dependencies[0]->getFileOccurrence()->getLine());
self::assertSame('anonymous_class_extends', $dependencies[0]->getType());

static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\AstRunner\Resolver\fixtures\InterfaceC',
$dependencies[1]->getClassLikeName()->toString()
);
static::assertSame($filePath, $dependencies[1]->getFileOccurrence()->getFilepath());
static::assertSame(19, $dependencies[1]->getFileOccurrence()->getLine());
static::assertSame('anonymous_class_implements', $dependencies[1]->getType());
self::assertSame($filePath, $dependencies[1]->getFileOccurrence()->getFilepath());
self::assertSame(19, $dependencies[1]->getFileOccurrence()->getLine());
self::assertSame('anonymous_class_implements', $dependencies[1]->getType());
}
}
14 changes: 7 additions & 7 deletions tests/AstRunner/Resolver/ClassConstantResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ public function testPropertyDependencyResolving(): void

$astClassReferences = $astFileReference->getAstClassReferences();

static::assertCount(2, $astClassReferences);
static::assertCount(0, $astClassReferences[0]->getDependencies());
static::assertCount(1, $astClassReferences[1]->getDependencies());
self::assertCount(2, $astClassReferences);
self::assertCount(0, $astClassReferences[0]->getDependencies());
self::assertCount(1, $astClassReferences[1]->getDependencies());

$dependencies = $astClassReferences[1]->getDependencies();
static::assertSame(
self::assertSame(
'Tests\SensioLabs\Deptrac\Integration\fixtures\ClassA',
$dependencies[0]->getClassLikeName()->toString()
);
static::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath());
static::assertSame(15, $dependencies[0]->getFileOccurrence()->getLine());
static::assertSame('const', $dependencies[0]->getType());
self::assertSame($filePath, $dependencies[0]->getFileOccurrence()->getFilepath());
self::assertSame(15, $dependencies[0]->getFileOccurrence()->getLine());
self::assertSame('const', $dependencies[0]->getType());
}
}
2 changes: 1 addition & 1 deletion tests/AstRunner/Resolver/TypeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testResolvePHPStanDocParserType(string $doc, array $types): void
$typeResolver = new TypeResolver();
$resolvedTypes = $typeResolver->resolvePHPStanDocParserType($typeNode, new TypeScope('\\Test\\'));

static::assertSame($types, $resolvedTypes);
self::assertSame($types, $resolvedTypes);
}

public function docBlockProvider(): iterable
Expand Down
Loading

0 comments on commit 8172b9a

Please sign in to comment.