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: Adjust Methods\FinalInAbstractClassRule to ignore Doctrine entities #396

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/** @eNtItY */
abstract class AbstractClassWithProtectedMethodAndWithoutEntityAnnotationInInlineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/**
* @eNtItY
*/
abstract class AbstractClassWithProtectedMethodAndWithoutEntityAnnotationInMultilineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/** @OrM\eNtItY */
abstract class AbstractClassWithProtectedMethodAndWithoutOrmEntityAnnotationInInlineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/**
* @OrM\eNtItY
*/
abstract class AbstractClassWithProtectedMethodAndWithoutOrmEntityAnnotationInMultilineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/** @eNtItY */
abstract class AbstractClassWithPublicMethodAndWithoutEntityAnnotationInInlineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/**
* @eNtItY
*/
abstract class AbstractClassWithPublicMethodAndWithoutEntityAnnotationInMultilineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/** @OrM\eNtItY */
abstract class AbstractClassWithPublicMethodAndWithoutOrmEntityAnnotationInInlineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Failure;

/**
* @OrM\eNtItY
*/
abstract class AbstractClassWithPublicMethodAndWithoutOrmEntityAnnotationInMultilineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @Entity */
abstract class AbstractClassWithProtectedMethodAndEntityAnnotationInInlineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @Entity
*/
abstract class AbstractClassWithProtectedMethodAndEntityAnnotationInMultilineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @ORM\Entity */
abstract class AbstractClassWithProtectedMethodAndOrmEntityAnnotationInInlineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @ORM\Entity
*/
abstract class AbstractClassWithProtectedMethodAndOrmEntityAnnotationInMultilineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @ORM\Mapping\Entity */
abstract class AbstractClassWithProtectedMethodAndOrmMappingEntityAnnotationInInlineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @ORM\Mapping\Entity
*/
abstract class AbstractClassWithProtectedMethodAndOrmMappingEntityAnnotationInMultilineDocBlock
{
protected function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @Entity */
abstract class AbstractClassWithPublicMethodAndEntityAnnotationInInlineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @Entity
*/
abstract class AbstractClassWithPublicMethodAndEntityAnnotationInMultilineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @ORM\Entity */
abstract class AbstractClassWithPublicMethodAndOrmEntityAnnotationInInlineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @ORM\Entity
*/
abstract class AbstractClassWithPublicMethodAndOrmEntityAnnotationInMultilineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/** @ORM\Mapping\Entity */
abstract class AbstractClassWithPublicMethodAndOrmMappingEntityAnnotationInInlineDocBlock
{
public function method(): void
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace Ergebnis\PHPStan\Rules\Test\Fixture\Methods\FinalInAbstractClassRule\Success;

/**
* @ORM\Mapping\Entity
*/
abstract class AbstractClassWithPublicMethodAndOrmMappingEntityAnnotationInMultilineDocBlock
{
public function method(): void
{
}
}
Loading