| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Constants |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @const ERR_ALREADY_DEFINED Exception code if the constant is already |
||
| 14 | * defined. |
||
| 15 | */ |
||
| 16 | const ERR_ALREADY_DEFINED = 1602001; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create a new constant if not exist |
||
| 20 | * |
||
| 21 | * @param string $cstName The constant's name |
||
| 22 | * @param mixed $cstValue The constant's value |
||
| 23 | * |
||
| 24 | * @return void |
||
| 25 | * |
||
| 26 | * @throws \Exception If the constant is already defined |
||
| 27 | */ |
||
| 28 | public static function create(string $cstName, $cstValue) |
||
| 40 |