| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | private function determineCommonCharacters(array $paths) |
||
| 31 | { |
||
| 32 | $commonCharacters = $paths[0]; |
||
| 33 | |||
| 34 | foreach ($paths as $path) { |
||
| 35 | if ($this->stringBeginsWith($path, $commonCharacters)) { |
||
| 36 | continue; |
||
| 37 | } |
||
| 38 | |||
| 39 | do { |
||
| 40 | $commonCharacters = substr($commonCharacters, 0, -1); |
||
| 41 | } while (!$this->stringBeginsWith($path, $commonCharacters)); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $commonCharacters; |
||
| 45 | } |
||
| 75 |