| @@ 163-172 (lines=10) @@ | ||
| 160 | /** |
|
| 161 | * {@inheritdoc} |
|
| 162 | */ |
|
| 163 | protected function getReferencesInDirectory($path, $stopOnFirst = false) |
|
| 164 | { |
|
| 165 | $basePath = rtrim($path, '/'); |
|
| 166 | ||
| 167 | return $this->getReferencesForRegex( |
|
| 168 | $basePath.'/', |
|
| 169 | '~^'.preg_quote($basePath, '~').'/[^/]+$~', |
|
| 170 | $stopOnFirst |
|
| 171 | ); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * {@inheritdoc} |
|
| @@ 317-330 (lines=14) @@ | ||
| 314 | /** |
|
| 315 | * {@inheritdoc} |
|
| 316 | */ |
|
| 317 | protected function getReferencesInDirectory($path, $stopOnFirst = false) |
|
| 318 | { |
|
| 319 | $basePath = rtrim($path, '/'); |
|
| 320 | ||
| 321 | return $this->getReferencesForRegex( |
|
| 322 | $basePath.'/', |
|
| 323 | '~^'.preg_quote($basePath, '~').'/[^/]+$~', |
|
| 324 | $stopOnFirst, |
|
| 325 | // Traverse directories and match their contents against the glob |
|
| 326 | true, |
|
| 327 | // Limit the directory exploration to the depth of the path + 1 |
|
| 328 | $this->getPathDepth($path) + 1 |
|
| 329 | ); |
|
| 330 | } |
|
| 331 | ||
| 332 | /** |
|
| 333 | * Flattens a two-level reference array into a one-level array. |
|