| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 55 | 4 | public function getContent(): string |
|
| 56 | { |
||
| 57 | 4 | if (empty($this->activeContentKey)) { |
|
| 58 | 1 | throw new \LogicException('Specify view helper Capturer\'s content key for getting content'); |
|
| 59 | } |
||
| 60 | 3 | if (!isset($this->capturedContent[$this->activeContentKey])) { |
|
| 61 | 1 | $errorMsg = "View helper Capturer does not have any content for key \"{$this->activeContentKey}\""; |
|
| 62 | 1 | throw new \LogicException($errorMsg); |
|
| 63 | } |
||
| 64 | |||
| 65 | 2 | return $this->capturedContent[$this->activeContentKey]; |
|
| 66 | } |
||
| 67 | } |
||
| 68 |