From b11f36ce0513f25a964bdad9240f8910a0b83d73 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 18 Dec 2024 12:15:24 +0100 Subject: [PATCH] add fixture stubs to make fixture repository rule work --- src/Enum/ClassName.php | 5 +++++ src/Rules/ClassNameRespectsParentSuffixRule.php | 2 +- stubs/Dibi/Connection.php | 13 ------------- stubs/Doctrine/Bundle/FixturesBundle/Fixture.php | 15 +++++++++++++++ .../Common/DataFixtures/FixtureInterface.php | 12 ++++++++++++ stubs/Doctrine/Persistence/ObjectManager.php | 12 ++++++++++++ 6 files changed, 45 insertions(+), 14 deletions(-) delete mode 100644 stubs/Dibi/Connection.php create mode 100644 stubs/Doctrine/Bundle/FixturesBundle/Fixture.php create mode 100644 stubs/Doctrine/Common/DataFixtures/FixtureInterface.php create mode 100644 stubs/Doctrine/Persistence/ObjectManager.php diff --git a/src/Enum/ClassName.php b/src/Enum/ClassName.php index 8f6fe268..7909e63c 100644 --- a/src/Enum/ClassName.php +++ b/src/Enum/ClassName.php @@ -26,6 +26,11 @@ final class ClassName */ public const EVENT_DISPATCHER_INTERFACE = 'Symfony\Component\EventDispatcher\EventDispatcherInterface'; + /** + * @var string + */ + public const EVENT_SUBSCRIBER_INTERFACE = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; + /** * @var string */ diff --git a/src/Rules/ClassNameRespectsParentSuffixRule.php b/src/Rules/ClassNameRespectsParentSuffixRule.php index 7e939dda..230b5ace 100644 --- a/src/Rules/ClassNameRespectsParentSuffixRule.php +++ b/src/Rules/ClassNameRespectsParentSuffixRule.php @@ -33,7 +33,7 @@ final class ClassNameRespectsParentSuffixRule implements Rule */ private const DEFAULT_PARENT_CLASSES = [ 'Symfony\Component\Console\Command\Command', - ClassName::EVENT_DISPATCHER_INTERFACE, + ClassName::EVENT_SUBSCRIBER_INTERFACE, ClassName::SYMFONY_ABSTRACT_CONTROLLER, ClassName::SNIFF, ClassName::PHPUNIT_TEST_CASE, diff --git a/stubs/Dibi/Connection.php b/stubs/Dibi/Connection.php deleted file mode 100644 index c5a96d0c..00000000 --- a/stubs/Dibi/Connection.php +++ /dev/null @@ -1,13 +0,0 @@ -