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