@@ -82,11 +82,17 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $filePath = str_replace(getcwd() . '/', '', $this->current()->getPathname()); |
| 84 | 84 | |
| 85 | - if ($this->strpos_array($filePath, $this->includes)) { return true; } |
|
| 86 | - if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) { return false; } |
|
| 85 | + if ($this->strpos_array($filePath, $this->includes)) |
|
| 86 | + { |
|
| 87 | +return true; } |
|
| 88 | + if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) |
|
| 89 | + { |
|
| 90 | +return false; } |
|
| 87 | 91 | |
| 88 | 92 | if (!($this->flags & self::ALLOW_DOT_FILES) && |
| 89 | - preg_match('#(^|/)\..+(/|$)#', $filePath) === 1) { return false; } |
|
| 93 | + preg_match('#(^|/)\..+(/|$)#', $filePath) === 1) |
|
| 94 | + { |
|
| 95 | +return false; } |
|
| 90 | 96 | |
| 91 | 97 | return ($this->strpos_array($filePath, $this->excludes) === false); |
| 92 | 98 | } |
@@ -166,10 +172,13 @@ discard block |
||
| 166 | 172 | |
| 167 | 173 | foreach ($needle as $query) |
| 168 | 174 | { |
| 169 | - if (strpos($haystack, $query, $offset) !== false) // stop on first true result |
|
| 175 | + if (strpos($haystack, $query, $offset) !== false) |
|
| 176 | + { |
|
| 177 | + // stop on first true result |
|
| 170 | 178 | { |
| 171 | 179 | return true; |
| 172 | 180 | } |
| 181 | + } |
|
| 173 | 182 | } |
| 174 | 183 | |
| 175 | 184 | return false; |