diff --git a/src/Command/InspectCommand.php b/src/Command/InspectCommand.php index fdf6725..70c86dd 100644 --- a/src/Command/InspectCommand.php +++ b/src/Command/InspectCommand.php @@ -22,20 +22,15 @@ final class InspectCommand extends Command /** @var string|null $defaultName */ public static $defaultName = 'servicemanager:inspect'; - /** @var DependencyConfigInterface */ - private $config; + private DependencyConfigInterface $config; - /** @var DependencyScannerInterface */ - private $dependencyScanner; + private DependencyScannerInterface $dependencyScanner; - /** @var TraverserInterface */ - private $traverser; + private TraverserInterface $traverser; - /** @var EventCollectorInterface */ - private $eventCollector; + private EventCollectorInterface $eventCollector; - /** @var EventReporterInterface */ - private $eventReporter; + private EventReporterInterface $eventReporter; public function __construct( DependencyConfigInterface $config, diff --git a/src/Dependency/Dependency.php b/src/Dependency/Dependency.php index 6ff4971..ba4dc5d 100644 --- a/src/Dependency/Dependency.php +++ b/src/Dependency/Dependency.php @@ -6,11 +6,9 @@ final class Dependency { - /** @var string */ - private $name; + private string $name; - /** @var bool */ - private $isOptional; + private bool $isOptional; public function __construct(string $name, bool $isOptional = false) { diff --git a/src/Event/AutowireFactoryEnteredEvent.php b/src/Event/AutowireFactoryEnteredEvent.php index d370da7..e8d5882 100644 --- a/src/Event/AutowireFactoryEnteredEvent.php +++ b/src/Event/AutowireFactoryEnteredEvent.php @@ -6,8 +6,7 @@ final class AutowireFactoryEnteredEvent implements EnterEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; /** @psalm-var list */ private $instantiationStack; diff --git a/src/Event/CircularDependencyDetectedEvent.php b/src/Event/CircularDependencyDetectedEvent.php index bdc5197..ad89da3 100644 --- a/src/Event/CircularDependencyDetectedEvent.php +++ b/src/Event/CircularDependencyDetectedEvent.php @@ -9,8 +9,7 @@ final class CircularDependencyDetectedEvent implements TerminalEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; /** @psalm-var list */ private $instantiationStack; diff --git a/src/Event/CustomFactoryEnteredEvent.php b/src/Event/CustomFactoryEnteredEvent.php index 0e1359e..0bbac60 100644 --- a/src/Event/CustomFactoryEnteredEvent.php +++ b/src/Event/CustomFactoryEnteredEvent.php @@ -6,8 +6,7 @@ final class CustomFactoryEnteredEvent implements EnterEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; /** @psalm-var list */ private $instantiationStack; diff --git a/src/Event/InvokableEnteredEvent.php b/src/Event/InvokableEnteredEvent.php index 3c20236..7206792 100644 --- a/src/Event/InvokableEnteredEvent.php +++ b/src/Event/InvokableEnteredEvent.php @@ -6,8 +6,7 @@ final class InvokableEnteredEvent implements EnterEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; /** @psalm-var list */ private $instantiationStack; diff --git a/src/Event/MissingFactoryDetectedEvent.php b/src/Event/MissingFactoryDetectedEvent.php index 9c18058..7c1184f 100644 --- a/src/Event/MissingFactoryDetectedEvent.php +++ b/src/Event/MissingFactoryDetectedEvent.php @@ -8,8 +8,7 @@ final class MissingFactoryDetectedEvent implements TerminalEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; public function __construct(string $dependencyName) { diff --git a/src/Event/UnresolvableParameterDetectedEvent.php b/src/Event/UnresolvableParameterDetectedEvent.php index f1ab9b0..31bcce2 100644 --- a/src/Event/UnresolvableParameterDetectedEvent.php +++ b/src/Event/UnresolvableParameterDetectedEvent.php @@ -8,11 +8,9 @@ final class UnresolvableParameterDetectedEvent implements TerminalEventInterface { - /** @var string */ - private $dependencyName; + private string $dependencyName; - /** @var string */ - private $paramName; + private string $paramName; public function __construct(string $dependencyName, string $paramName) { diff --git a/src/EventCollector/EventCollector.php b/src/EventCollector/EventCollector.php index fd60f8c..f3bf740 100644 --- a/src/EventCollector/EventCollector.php +++ b/src/EventCollector/EventCollector.php @@ -13,7 +13,7 @@ final class EventCollector implements EventCollectorInterface * @psalm-var list * @var EventInterface[] */ - private $events = []; + private array $events = []; /** * TODO preserve number of occurred events per dependency diff --git a/src/EventReporter/ConsoleDetailedEventReporter.php b/src/EventReporter/ConsoleDetailedEventReporter.php index dedcab3..abcf0fd 100644 --- a/src/EventReporter/ConsoleDetailedEventReporter.php +++ b/src/EventReporter/ConsoleDetailedEventReporter.php @@ -8,6 +8,7 @@ use Laminas\ServiceManager\Inspector\Event\EventInterface; use Laminas\ServiceManager\Inspector\Event\TerminalEventInterface; use Laminas\ServiceManager\Inspector\EventReporter\ConsoleColor\ConsoleColorInterface; +use Laminas\ServiceManager\Inspector\EventReporter\ConsoleSummaryEventReporter; use Symfony\Component\Console\Output\OutputInterface; use function count; @@ -16,11 +17,9 @@ final class ConsoleDetailedEventReporter implements EventReporterInterface { - /** @var ConsoleColorInterface */ - private $consoleColor; + private ConsoleColorInterface $consoleColor; - /** @var ConsoleSummaryEventReporter */ - private $summaryReporter; + private ConsoleSummaryEventReporter $summaryReporter; public function __construct(ConsoleColorInterface $consoleColor, ConsoleSummaryEventReporter $summaryReporter) { diff --git a/src/EventReporter/ConsoleSummaryEventReporter.php b/src/EventReporter/ConsoleSummaryEventReporter.php index 2e2973e..bca7779 100644 --- a/src/EventReporter/ConsoleSummaryEventReporter.php +++ b/src/EventReporter/ConsoleSummaryEventReporter.php @@ -18,8 +18,7 @@ class ConsoleSummaryEventReporter implements EventReporterInterface { - /** @var ConsoleColorInterface */ - private $consoleColor; + private ConsoleColorInterface $consoleColor; public function __construct(ConsoleColorInterface $consoleColor) { diff --git a/src/Scanner/ReflectionBasedDependencyScanner.php b/src/Scanner/ReflectionBasedDependencyScanner.php index e3bbfa2..06efcb4 100644 --- a/src/Scanner/ReflectionBasedDependencyScanner.php +++ b/src/Scanner/ReflectionBasedDependencyScanner.php @@ -27,11 +27,9 @@ final class ReflectionBasedDependencyScanner implements DependencyScannerInterfa 'Zend\ServiceManager\AbstractFactory\ReflectionBasedAbstractFactory', ]; - /** @var DependencyConfigInterface */ - private $config; + private DependencyConfigInterface $config; - /** @var EventCollectorInterface */ - private $eventCollector; + private EventCollectorInterface $eventCollector; public function __construct(DependencyConfigInterface $config, EventCollectorInterface $eventCollector) { diff --git a/src/Traverser/Traverser.php b/src/Traverser/Traverser.php index a08b5ae..be54fec 100644 --- a/src/Traverser/Traverser.php +++ b/src/Traverser/Traverser.php @@ -25,14 +25,11 @@ */ final class Traverser implements TraverserInterface { - /** @var DependencyConfigInterface */ - private $config; + private DependencyConfigInterface $config; - /** @var DependencyScannerInterface */ - private $dependencyScanner; + private DependencyScannerInterface $dependencyScanner; - /** @var EventCollectorInterface */ - private $eventCollector; + private EventCollectorInterface $eventCollector; public function __construct( DependencyConfigInterface $config,