Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove abstract test case #888

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 11 additions & 11 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,17 +37,16 @@
$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',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInAnonymousClassWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInClassWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/Failure/MethodInInterfaceWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/method-in-anonymous-class-with-parameter-with-nullable-union-type-declaration.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/MethodInClassWithParameterWithNullableUnionTypeDeclaration.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/Failure/MethodInInterfaceWithParameterWithNullableUnionTypeDeclaration.php',
'Closures/NoNullableReturnTypeDeclarationRule/script.php',
'Closures/NoParameterWithNullableTypeDeclarationRule/script.php',
'Functions/NoNullableReturnTypeDeclarationRule/script.php',
'Functions/NoParameterWithNullableTypeDeclarationRule/script.php',
'Methods/NoNullableReturnTypeDeclarationRule/MethodInClassWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/MethodInInterfaceWithNullableUnionReturnTypeDeclaration.php',
'Methods/NoNullableReturnTypeDeclarationRule/script.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/MethodInClassWithParameterWithNullableUnionTypeDeclaration.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/MethodInInterfaceWithParameterWithNullableUnionTypeDeclaration.php',
'Methods/NoParameterWithNullableTypeDeclarationRule/script.php',
]);

$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.fixture.cache');
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.

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
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;

$foo = new class() {
public function __toString(): string
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading