Passed
Pull Request — master (#68)
by Björn
03:14
created
src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
         /* @var $file \SplFileInfo */
28 28
         foreach ($files as $file) {
29
-            if ($blacklist && preg_match('{('.implode('|', $blacklist).')}', $file->getPathname())) {
29
+            if ($blacklist && preg_match('{(' . implode('|', $blacklist) . ')}', $file->getPathname())) {
30 30
                 continue;
31 31
             }
32 32
 
Please login to merge, or discard this patch.
src/ComposerRequireChecker/NodeVisitor/IncludeCollector.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         foreach ($this->included as $exp) {
44 44
             try {
45 45
                 $this->computePath($included, $this->processIncludePath($exp, $file), $file);
46
-            } catch(InvalidArgumentException $x) {
46
+            } catch (InvalidArgumentException $x) {
47 47
                 var_dump($x->getMessage());
48 48
             }
49 49
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     private function computePath(array &$included, string $path, string $self)
60 60
     {
61 61
         if (!preg_match('#^([A-Z]:)?/#i', str_replace('\\', '/', $path))) {
62
-            $path = dirname($self).'/'.$path;
62
+            $path = dirname($self) . '/' . $path;
63 63
         }
64 64
         if (false === strpos($path, '{var}')) {
65 65
             $included[] = $path;
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
         }
68 68
         $parts = explode('{var}', $path);
69 69
         $regex = [];
70
-        foreach($parts as $part) {
70
+        foreach ($parts as $part) {
71 71
             $regex[] = preg_quote(str_replace('\\', '/', $part), '/');
72 72
         }
73
-        $regex = '/^'.implode('.+', $regex).'$/';
73
+        $regex = '/^' . implode('.+', $regex) . '$/';
74 74
         $self = str_replace('\\', '/', $self);
75 75
         foreach (new RecursiveIteratorIterator(
76 76
             new RecursiveDirectoryIterator(
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             return $exp;
98 98
         }
99 99
         if ($exp instanceof Concat) {
100
-            return $this->processIncludePath($exp->left, $file).$this->processIncludePath($exp->right, $file);
100
+            return $this->processIncludePath($exp->left, $file) . $this->processIncludePath($exp->right, $file);
101 101
         }
102 102
         if ($exp instanceof Dir) {
103 103
             return dirname($file);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         if ($exp instanceof Variable || $exp instanceof ConstFetch) {
115 115
             return '{var}';
116 116
         }
117
-        throw new InvalidArgumentException('can\'t yet handle '.$exp->getType());
117
+        throw new InvalidArgumentException('can\'t yet handle ' . $exp->getType());
118 118
     }
119 119
 
120 120
     /**
Please login to merge, or discard this patch.
DefinedSymbolsLocator/LocateDefinedSymbolsFromASTRootsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 
133 133
     private function locate(array $roots): array
134 134
     {
135
-        foreach($roots as &$ast) {
135
+        foreach ($roots as &$ast) {
136 136
             $ast = new FileAST('', $ast);
137 137
         }
138 138
         return ($this->locator)(new ArrayObject($roots));
Please login to merge, or discard this patch.
UsedSymbolsLocator/LocateUsedSymbolsFromASTRootsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     private function locate(array $asts): array
53 53
     {
54
-        foreach($asts as &$ast) {
54
+        foreach ($asts as &$ast) {
55 55
             $ast = new FileAST('', $ast);
56 56
         }
57 57
         return ($this->locator)(new ArrayObject($asts));
Please login to merge, or discard this patch.