Skip to content

Commit

Permalink
Fix: Remove abstract test case
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 6, 2025
1 parent 317259a commit d4c1e3c
Show file tree
Hide file tree
Showing 190 changed files with 782 additions and 1,844 deletions.
10 changes: 5 additions & 5 deletions .php-cs-fixer.fixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'lowercase_keywords' => false,
'magic_method_casing' => false,
'native_function_casing' => false,
'native_function_invocation' => false,
'nullable_type_declaration' => false,
'protected_to_private' => false,
'static_lambda' => false,
Expand All @@ -36,11 +37,10 @@
$config->getFinder()
->in(__DIR__ . '/test/Fixture/')
->notPath([
'Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php',
'Closures/NoNullableReturnTypeDeclarationRule/Failure/closure-with-nullable-union-type-return-type-declaration.php',
'Closures/NoParameterWithNullableTypeDeclarationRule/Failure/closure-with-parameter-with-nullable-union-type-declaration.php',
'Functions/NoNullableReturnTypeDeclarationRule/Failure/function-with-nullable-union-return-type-declaration.php',
'Functions/NoParameterWithNullableTypeDeclarationRule/Failure/function-with-parameter-with-nullable-union-type-declaration.php',
'Closures/NoNullableReturnTypeDeclarationRule/script.php',
'Closures/NoParameterWithNullableTypeDeclarationRule/script.php',
'Functions/NoNullableReturnTypeDeclarationRule/script.php',
'Functions/NoParameterWithNullableTypeDeclarationRule/script.php',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInAnonymousClassWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInClassWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInInterfaceWithNullableUnionReturnTypeDeclaration.php',
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"phpstan/phpstan-strict-rules": "^1.6.1",
"phpunit/phpunit": "^9.6.21",
"psr/container": "^2.0.2",
"symfony/finder": "^5.4.45",
"symfony/process": "^5.4.47"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,33 @@ parameters:
count: 1
path: src/Functions/NoNullableReturnTypeDeclarationRule.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\FinalInAbstractClassRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/FinalInAbstractClassRuleTest.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\NoConstructorParameterWithDefaultValueRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/NoConstructorParameterWithDefaultValueRuleTest.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\NoNullableReturnTypeDeclarationRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/NoNullableReturnTypeDeclarationRuleTest.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\NoParameterWithContainerTypeDeclarationRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/NoParameterWithContainerTypeDeclarationRuleTest.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\NoParameterWithNullDefaultValueRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/NoParameterWithNullDefaultValueRuleTest.php

-
message: "#^Class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\Methods\\\\NoParameterWithNullableTypeDeclarationRuleTest extends deprecated class Ergebnis\\\\PHPStan\\\\Rules\\\\Test\\\\Integration\\\\AbstractTestCase\\.$#"
count: 1
path: test/Integration/Methods/NoParameterWithNullableTypeDeclarationRuleTest.php

9 changes: 9 additions & 0 deletions test/Fixture/Classes/FinalRule/AbstractClass.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

abstract class AbstractClass
{
}
9 changes: 9 additions & 0 deletions test/Fixture/Classes/FinalRule/ExampleInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

interface ExampleInterface
{
}
9 changes: 9 additions & 0 deletions test/Fixture/Classes/FinalRule/ExampleTrait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

trait ExampleTrait
{
}
9 changes: 0 additions & 9 deletions test/Fixture/Classes/FinalRule/Failure/AbstractClass.php

This file was deleted.

9 changes: 9 additions & 0 deletions test/Fixture/Classes/FinalRule/FinalClass.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

final class FinalClass
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

final class FinalClassWithAnonymousClass
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

class NeitherAbstractNorFinalClass
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

use Doctrine\ORM\Mapping as ORM;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/** @Entity */
class NonFinalClassWithEntityAnnotationInInlineDocBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/**
* @Table(name="hmm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/** @ORM\Entity */
class NonFinalClassWithOrmEntityAnnotationInInlineDocBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/**
* @ORM\Table(name="hmm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/** @ORM\Mapping\Entity */
class NonFinalClassWithOrmMappingEntityAnnotationInInlineDocBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/**
* @ORM\Mapping\Table(name="hmm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

#[\Doctrine\ORM\Mapping\Entity()]
class NonFinalClassWithQualifiedDoctrineOrmMappingEntityAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

use Doctrine\ORM\Mapping\Entity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

use Doctrine\ORM\Mapping;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

use Doctrine\ORM;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

#[Doctrine\ORM\Mapping\Entity()]
class NonFinalClassWithUnqualifiedDoctrineOrmMappingEntityAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

#[Entity()]
class NonFinalClassWithUnqualifiedEntityAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

#[ORM\Entity()]
class NonFinalClassWithUnqualifiedOrmEntityAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRuleWithAttributes\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

#[ORM\Mapping\Entity()]
class NonFinalClassWithUnqualifiedOrmMappingEntityAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/** @eNtItY */
class NonFinalClassWithoutEntityAnnotationInInlineDocBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/**
* @Table(name="hmm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/** @OrM\eNtItY */
class NonFinalClassWithoutOrmEntityAnnotationInInlineDocBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Failure;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

/**
* @ORM\Table(name="hmm")
Expand Down
9 changes: 0 additions & 9 deletions test/Fixture/Classes/FinalRule/Success/ExampleInterface.php

This file was deleted.

9 changes: 0 additions & 9 deletions test/Fixture/Classes/FinalRule/Success/ExampleTrait.php

This file was deleted.

9 changes: 0 additions & 9 deletions test/Fixture/Classes/FinalRule/Success/FinalClass.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule\Success;
namespace Ergebnis\PHPStan\Rules\Test\Fixture\Classes\FinalRule;

trait TraitWithAnonymousClass
{
Expand Down
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d4c1e3c

Please sign in to comment.