@@ -143,11 +143,17 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function matchesPattern ($filePath) |
| 145 | 145 | { |
| 146 | - if ($this->strpos_array($filePath, $this->includes)) { return true; } |
|
| 147 | - if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) { return false; } |
|
| 146 | + if ($this->strpos_array($filePath, $this->includes)) |
|
| 147 | + { |
|
| 148 | +return true; } |
|
| 149 | + if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) |
|
| 150 | + { |
|
| 151 | +return false; } |
|
| 148 | 152 | |
| 149 | 153 | if (!($this->flags & self::ALLOW_DOT_FILES) && |
| 150 | - preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1) { return false; } |
|
| 154 | + preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1) |
|
| 155 | + { |
|
| 156 | +return false; } |
|
| 151 | 157 | |
| 152 | 158 | return ($this->strpos_array($filePath, $this->excludes) === false); |
| 153 | 159 | } |
@@ -192,10 +198,13 @@ discard block |
||
| 192 | 198 | return true; |
| 193 | 199 | } |
| 194 | 200 | |
| 195 | - if (strpos($haystack, $query, $offset) !== false) // stop on first true result |
|
| 201 | + if (strpos($haystack, $query, $offset) !== false) |
|
| 202 | + { |
|
| 203 | + // stop on first true result |
|
| 196 | 204 | { |
| 197 | 205 | return true; |
| 198 | 206 | } |
| 207 | + } |
|
| 199 | 208 | } |
| 200 | 209 | |
| 201 | 210 | return false; |