Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
24 | trait RangeValidityCheck |
||
25 | { |
||
26 | protected $ranges = []; |
||
27 | |||
28 | /** |
||
29 | * Validates the BillingContext#structure |
||
30 | * |
||
31 | * An interpreter that returns false if it can not match the structure of the |
||
32 | * context. |
||
33 | * True is returned if the structure is syntactically correct and contextually |
||
34 | * it can be interpreted |
||
35 | * |
||
36 | * An exception is throw when structurally the notation/structure provided is |
||
37 | * semantically valid but contextually cannot be interpreted |
||
38 | * |
||
39 | * @param BillContext $context The context to be validated |
||
40 | * @return bool true if the context is validated, false otherwise |
||
41 | * @throws RangeException |
||
42 | */ |
||
43 | 12 | public function isValid(BillContext $context): bool |
|
54 |