| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function buildSource(): Source |
||
| 34 | { |
||
| 35 | $combinedSource = ''; |
||
| 36 | |||
| 37 | foreach ($this->filePaths as $filePath) { |
||
| 38 | if (!\file_exists($filePath) || !\is_readable($filePath)) { |
||
| 39 | throw new InvariantException(sprintf('The file %s cannot be found or is not readable', $filePath)); |
||
| 40 | } |
||
| 41 | |||
| 42 | $combinedSource .= \file_get_contents($filePath); |
||
| 43 | } |
||
| 44 | |||
| 45 | return new Source($combinedSource); |
||
| 46 | } |
||
| 48 |