Completed
Pull Request — master (#12)
by Jakub
03:54
created
DependencyInjection/Compiler/AutowiringCompilerPass.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@
 block discarded – undo
331 331
 	/**
332 332
 	 * @param ReflectionProperty|ReflectionParameter $target
333 333
 	 * @param string $docComment
334
-	 * @param $preferredServices
334
+	 * @param string[] $preferredServices
335 335
 	 * @return mixed
336 336
 	 */
337 337
 	private function getValue($target, $docComment, $preferredServices)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		$this->classMap = $classMap;
50 50
 		$this->annotationReader = $annotationReader;
51 51
 		$this->phpParser = $phpParser;
52
-		AnnotationRegistry::registerFile(__DIR__ . "/../../Annotation/Autowired.php");
52
+		AnnotationRegistry::registerFile(__DIR__."/../../Annotation/Autowired.php");
53 53
 	}
54 54
 
55 55
 	public function process(ContainerBuilder $container)
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 		}
64 64
 
65 65
 		try {
66
-			$fastAnnotationChecksRegex = "/" . implode("|", array_map(function ($s) {
66
+			$fastAnnotationChecksRegex = "/".implode("|", array_map(function($s) {
67 67
 					return preg_quote($s);
68
-				}, (array)$parameterBag->resolveValue("%autowiring.fast_annotation_checks%"))) . "/";
68
+				}, (array)$parameterBag->resolveValue("%autowiring.fast_annotation_checks%")))."/";
69 69
 		} catch (ParameterNotFoundException $exception) {
70 70
 			$fastAnnotationChecksRegex = null;
71 71
 		}
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 				$className = $target->getClass()->getName();
346 346
 
347 347
 			} elseif (preg_match(
348
-				"/@param\\s+([a-zA-Z0-9\\\\_]+)(\\[\\])?(\\|[^\\s]+)*\\s+\\\$" . preg_quote($target->getName()) . "/",
348
+				"/@param\\s+([a-zA-Z0-9\\\\_]+)(\\[\\])?(\\|[^\\s]+)*\\s+\\\$".preg_quote($target->getName())."/",
349 349
 				$docComment,
350 350
 				$m
351 351
 			)) {
@@ -377,14 +377,14 @@  discard block
 block discarded – undo
377 377
 		if (isset($useStatements[$lowerClassName])) {
378 378
 			$className = $useStatements[$lowerClassName];
379 379
 		} elseif (strpos($className, "\\") === false) {
380
-			$className = $target->getDeclaringClass()->getNamespaceName() . "\\" . $className;
380
+			$className = $target->getDeclaringClass()->getNamespaceName()."\\".$className;
381 381
 		}
382 382
 
383 383
 		$className = trim($className, "\\");
384 384
 
385 385
 		// autowire from class map
386 386
 		if ($isArray) {
387
-			return array_map(function ($serviceId) {
387
+			return array_map(function($serviceId) {
388 388
 				return new Reference($serviceId);
389 389
 			}, $this->classMap->getMulti($className));
390 390
 
Please login to merge, or discard this patch.