| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Assert extends AppendCode |
||
| 9 | { |
||
| 10 | private string $assertion; |
||
| 11 | |||
| 12 | public function __construct(string $assertion) |
||
| 13 | { |
||
| 14 | parent::__construct("if (!$assertion) trigger_error('Assertion failed', E_USER_ERROR);"); |
||
| 15 | $this->assertion = $assertion; |
||
| 16 | } |
||
| 17 | |||
| 18 | public function asAttribute(): string |
||
| 21 | } |
||
| 22 | } |
||
| 23 |