| Conditions | 4 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function load($path) |
||
| 27 | { |
||
| 28 | if ($this->pathResolver !== null) { |
||
| 29 | $resolver = $this->pathResolver; |
||
| 30 | $path = $resolver($path); |
||
| 31 | } |
||
| 32 | |||
| 33 | if (!isset($this->content[$path])) { |
||
| 34 | if (!file_exists($path)) { |
||
| 35 | $message = sprintf('Could not find template file %s', $path); |
||
| 36 | |||
| 37 | throw new \Vaimo\ComposerChangelogs\Exceptions\LoaderException($message); |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->content[$path] = file_get_contents($path); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $this->content[$path]; |
||
| 44 | } |
||
| 46 |