Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class AttributeException extends Exception |
||
15 | { |
||
16 | public const UNDEFINED_NAME = 'Attribute name must be provided!'; |
||
17 | public const UNDEFINED_TYPE = 'Attribute type must be provided!'; |
||
18 | public const UNSUPPORTED_TYPE = 'Type is not supported: %s'; |
||
19 | |||
20 | /** |
||
21 | * @throws AttributeException |
||
22 | */ |
||
23 | 1 | public static function undefinedAttributeName() |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @throws AttributeException |
||
30 | */ |
||
31 | 1 | public static function undefinedAttributeType() |
|
32 | { |
||
33 | 1 | throw new static(self::UNDEFINED_TYPE); |
|
34 | } |
||
35 | |||
36 | /** |
||
37 | * @throws AttributeException |
||
38 | */ |
||
39 | 1 | public static function unsupportedType($type) |
|
42 | } |
||
43 | } |