22
33declare (strict_types=1 );
44
5- /*
6- * @copyright Copyright (c) 2020, terminal42 gmbh
7- * @author terminal42 gmbh <https://terminal42.ch>
8- * @license MIT
9- * @link http://github.com/terminal42/service-annotation-bundle
10- */
11-
125namespace Terminal42 \ServiceAnnotationBundle \DependencyInjection \Compiler ;
136
147use Doctrine \Common \Annotations \AnnotationException ;
158use Doctrine \Common \Annotations \AnnotationReader ;
169use Doctrine \Common \Annotations \Reader ;
1710use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
1811use Symfony \Component \DependencyInjection \ContainerBuilder ;
12+ use Symfony \Component \DependencyInjection \ContainerInterface ;
1913use Symfony \Component \DependencyInjection \Definition ;
2014use Terminal42 \ServiceAnnotationBundle \Annotation \ServiceTagInterface ;
2115
@@ -28,7 +22,7 @@ class ServiceAnnotationPass implements CompilerPassInterface
2822
2923 public function process (ContainerBuilder $ container ): void
3024 {
31- $ this ->annotationReader = $ container ->get ('annotation_reader ' , ContainerBuilder ::NULL_ON_INVALID_REFERENCE ) ?? new AnnotationReader ();
25+ $ this ->annotationReader = $ container ->get ('annotation_reader ' , ContainerInterface ::NULL_ON_INVALID_REFERENCE ) ?? new AnnotationReader ();
3226
3327 foreach ($ container ->getDefinitions () as $ id => $ definition ) {
3428 if ($ definition ->isAbstract () || $ definition ->isSynthetic ()) {
@@ -58,6 +52,9 @@ public function process(ContainerBuilder $container): void
5852 }
5953 }
6054
55+ /**
56+ * @param \ReflectionClass<\stdClass> $reflection
57+ */
6158 private function parseClassAnnotations (\ReflectionClass $ reflection , Definition $ definition ): void
6259 {
6360 try {
@@ -76,6 +73,9 @@ private function parseClassAnnotations(\ReflectionClass $reflection, Definition
7673 }
7774 }
7875
76+ /**
77+ * @param \ReflectionClass<\stdClass> $reflection
78+ */
7979 private function parseMethodAnnotations (\ReflectionClass $ reflection , Definition $ definition ): void
8080 {
8181 foreach ($ reflection ->getMethods () as $ method ) {
0 commit comments