Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| InvalidAttributeException | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace SciPhp\Exception; |
| 6 | |
| 7 | use Exception; |
| 8 | |
| 9 | final class InvalidAttributeException extends Exception |
| 10 | { |
| 11 | public function __construct(string $class, string $attribute) |
| 12 | { |
| 13 | $message = sprintf( |
| 14 | Message::ATTR_NOT_DEFINED, |
| 15 | $attribute, |
| 16 | $class |
| 17 | ); |
| 18 | |
| 19 | parent::__construct($message, 0, null); |
| 20 | } |
| 21 | } |