| Conditions | 5 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | protected function filesLength(): int |
||
| 32 | { |
||
| 33 | $this->log('Getting the maximum length of a filenames...'); |
||
| 34 | |||
| 35 | if ($this->files_length > 0) { |
||
| 36 | return $this->files_length; |
||
| 37 | } |
||
| 38 | |||
| 39 | $this->log('Calculating the maximum length of a filenames...'); |
||
| 40 | |||
| 41 | $files = []; |
||
| 42 | |||
| 43 | foreach ($this->packages() as $package) { |
||
| 44 | $files = array_merge($files, $this->files($package)); |
||
| 45 | |||
| 46 | foreach ($this->plugins() as $plugin) { |
||
| 47 | if ($plugin->has()) { |
||
| 48 | $files = array_merge($files, $plugin->source()); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | return $this->files_length = Arr::longestStringLength(array_unique($files)); |
||
| 54 | } |
||
| 56 |