@@ -15,7 +15,7 @@ |
||
15 | 15 | $autoload = $root.'/vendor/autoload.php'; |
16 | 16 | |
17 | 17 | // we need the autoloader to be present |
18 | - if($autoload === false) |
|
18 | + if ($autoload === false) |
|
19 | 19 | { |
20 | 20 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
21 | 21 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param string[] $paths |
33 | 33 | * @throws FileHelper_Exception |
34 | 34 | */ |
35 | - public function __construct(array $paths=array()) |
|
35 | + public function __construct(array $paths = array()) |
|
36 | 36 | { |
37 | 37 | $this->addPaths($paths); |
38 | 38 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function addPaths(array $paths) : FileHelper_PathsReducer |
48 | 48 | { |
49 | - foreach($paths as $path) { |
|
49 | + foreach ($paths as $path) { |
|
50 | 50 | $this->addPath($path); |
51 | 51 | } |
52 | 52 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | { |
65 | 65 | $path = FileHelper::normalizePath(FileHelper::requireFileExists($path)); |
66 | 66 | |
67 | - if(!in_array($path, $this->paths)) { |
|
67 | + if (!in_array($path, $this->paths)) { |
|
68 | 68 | $this->paths[] = $path; |
69 | 69 | } |
70 | 70 | |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | { |
82 | 82 | $split = $this->splitPaths(); |
83 | 83 | |
84 | - if(empty($split)) { |
|
84 | + if (empty($split)) { |
|
85 | 85 | return array(); |
86 | 86 | } |
87 | 87 | |
88 | - while($this->shiftPart($split) === true) {} |
|
88 | + while ($this->shiftPart($split) === true) {} |
|
89 | 89 | |
90 | 90 | return $this->joinPaths($split); |
91 | 91 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $result = array(); |
100 | 100 | |
101 | 101 | foreach ($split as $entry) { |
102 | - if(!empty($entry)) { |
|
102 | + if (!empty($entry)) { |
|
103 | 103 | $result[] = implode('/', $entry); |
104 | 104 | } |
105 | 105 | } |
@@ -116,22 +116,22 @@ discard block |
||
116 | 116 | $current = null; |
117 | 117 | $result = array(); |
118 | 118 | |
119 | - foreach($split as $entry) |
|
119 | + foreach ($split as $entry) |
|
120 | 120 | { |
121 | - if(empty($entry)) { |
|
121 | + if (empty($entry)) { |
|
122 | 122 | return false; |
123 | 123 | } |
124 | 124 | |
125 | 125 | $part = array_shift($entry); |
126 | - if(empty($entry)) { |
|
126 | + if (empty($entry)) { |
|
127 | 127 | return false; |
128 | 128 | } |
129 | 129 | |
130 | - if($current === null) { |
|
130 | + if ($current === null) { |
|
131 | 131 | $current = $part; |
132 | 132 | } |
133 | 133 | |
134 | - if($part !== $current) { |
|
134 | + if ($part !== $current) { |
|
135 | 135 | return false; |
136 | 136 | } |
137 | 137 | |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | { |
148 | 148 | $split = array(); |
149 | 149 | |
150 | - foreach($this->paths as $path) { |
|
150 | + foreach ($this->paths as $path) { |
|
151 | 151 | $entry = ConvertHelper::explodeTrim('/', $path); |
152 | - if(!empty($entry)) { |
|
152 | + if (!empty($entry)) { |
|
153 | 153 | $split[] = $entry; |
154 | 154 | } |
155 | 155 | } |