diff --git a/src/Application/Extension/ExtensionInterface.php b/src/Application/Extension/ExtensionInterface.php index 1a6d7587..9e0255ba 100644 --- a/src/Application/Extension/ExtensionInterface.php +++ b/src/Application/Extension/ExtensionInterface.php @@ -15,8 +15,6 @@ interface ExtensionInterface { /** * Returns name of extension (must be unique) - * - * @return string */ public function getName(): string; } diff --git a/src/Application/Extension/ExtensionLoaderInterface.php b/src/Application/Extension/ExtensionLoaderInterface.php index f14b5953..a72ea771 100644 --- a/src/Application/Extension/ExtensionLoaderInterface.php +++ b/src/Application/Extension/ExtensionLoaderInterface.php @@ -20,15 +20,9 @@ interface ExtensionLoaderInterface */ public function getNames(): array; - /** - * @param string $name - * @return bool - */ public function has(string $name): bool; /** - * @param string $name - * @return ExtensionInterface * @throws LogicException */ public function get(string $name): ExtensionInterface; diff --git a/src/Application/Extension/FactoryExtensionLoader.php b/src/Application/Extension/FactoryExtensionLoader.php index 7c4e4d55..cfebc2fa 100644 --- a/src/Application/Extension/FactoryExtensionLoader.php +++ b/src/Application/Extension/FactoryExtensionLoader.php @@ -47,23 +47,20 @@ public function __construct(iterable $extensions) } /** - * {@inheritDoc} + * @inheritDoc */ public function getNames(): array { return array_keys($this->factories); } - /** - * {@inheritDoc} - */ public function has(string $name): bool { return isset($this->factories[$name]); } /** - * {@inheritDoc} + * @inheritDoc */ public function get(string $name): ExtensionInterface { diff --git a/src/Application/Extension/Logger.php b/src/Application/Extension/Logger.php index d18f6271..5db4ca2d 100644 --- a/src/Application/Extension/Logger.php +++ b/src/Application/Extension/Logger.php @@ -35,7 +35,6 @@ use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use function get_class; @@ -63,8 +62,6 @@ final class Logger implements /** * Logger extension constructor. - * - * @param LoggerInterface $logger */ public function __construct(LoggerInterface $logger) { @@ -72,7 +69,7 @@ public function __construct(LoggerInterface $logger) } /** - * {@inheritDoc} + * @inheritDoc */ public function getName(): string { @@ -80,7 +77,7 @@ public function getName(): string } /** - * {@inheritDoc} + * @inheritDoc */ public static function getSubscribedEvents(): array { @@ -93,9 +90,6 @@ public static function getSubscribedEvents(): array /** * Initialize logger extension, by `analyser:run --debug` command - * - * @param ConsoleCommandEvent $event - * @return void */ public function onConsoleCommand(ConsoleCommandEvent $event): void { @@ -110,10 +104,6 @@ public function onConsoleCommand(ConsoleCommandEvent $event): void $this->logger->info('Start {command} command.', $context); } - /** - * @param ConsoleTerminateEvent $event - * @return void - */ public function onConsoleTerminate(ConsoleTerminateEvent $event): void { $context = ['command' => $event->getCommand()->getName()]; @@ -121,7 +111,7 @@ public function onConsoleTerminate(ConsoleTerminateEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeAnalyzeFile(BeforeFileAnalysisEvent $event): void { @@ -129,7 +119,7 @@ public function beforeAnalyzeFile(BeforeFileAnalysisEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterAnalyzeFile(AfterFileAnalysisEvent $event): void { @@ -138,7 +128,6 @@ public function afterAnalyzeFile(AfterFileAnalysisEvent $event): void /** * @param ErrorEvent $event - * @return void */ public function onError(ErrorEvent $event): void { @@ -146,7 +135,7 @@ public function onError(ErrorEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterAnalysis(AfterAnalysisEvent $event): void { @@ -157,7 +146,7 @@ public function afterAnalysis(AfterAnalysisEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeEnterNode(BeforeProcessNodeEvent $event): void { @@ -174,7 +163,7 @@ public function beforeEnterNode(BeforeProcessNodeEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterLeaveNode(AfterProcessNodeEvent $event): void { @@ -191,7 +180,7 @@ public function afterLeaveNode(AfterProcessNodeEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeSetupSniff(BeforeInitializeSniffEvent $event): void { @@ -199,7 +188,7 @@ public function beforeSetupSniff(BeforeInitializeSniffEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterTearDownSniff(AfterInitializeSniffEvent $event): void { @@ -207,7 +196,7 @@ public function afterTearDownSniff(AfterInitializeSniffEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeEnterSniff(BeforeProcessSniffEvent $event): void { @@ -215,7 +204,7 @@ public function beforeEnterSniff(BeforeProcessSniffEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterLeaveSniff(AfterProcessSniffEvent $event): void { diff --git a/src/Application/Extension/ProgressBar.php b/src/Application/Extension/ProgressBar.php index 4ac59f8b..2c3b9e72 100644 --- a/src/Application/Extension/ProgressBar.php +++ b/src/Application/Extension/ProgressBar.php @@ -39,7 +39,7 @@ final class ProgressBar implements private ?SymfonyProgressBar $progressBar = null; /** - * {@inheritDoc} + * @inheritDoc */ public static function getSubscribedEvents(): array { @@ -65,7 +65,7 @@ public function initProgress(ConsoleCommandEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function getName(): string { @@ -73,17 +73,15 @@ public function getName(): string } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeAnalysis(BeforeAnalysisEvent $event): void { - if ($this->progressBar) { - $this->progressBar->start(count($event->getArgument('queue'))); - } + $this->progressBar?->start(count($event->getArgument('queue'))); } /** - * {@inheritDoc} + * @inheritDoc */ public function afterAnalysis(AfterAnalysisEvent $event): void { @@ -94,7 +92,7 @@ public function afterAnalysis(AfterAnalysisEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function beforeAnalyzeFile(BeforeFileAnalysisEvent $event): void { @@ -105,12 +103,10 @@ public function beforeAnalyzeFile(BeforeFileAnalysisEvent $event): void } /** - * {@inheritDoc} + * @inheritDoc */ public function afterAnalyzeFile(AfterFileAnalysisEvent $event): void { - if ($this->progressBar) { - $this->progressBar->advance(); - } + $this->progressBar?->advance(); } }