Total Complexity | 5 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | final class IpagEnvironment extends Environment |
||
6 | { |
||
7 | public const VERSION = '2'; |
||
8 | public const LOCAL = 'api.ipag.test'; |
||
9 | public const PRODUCTION = 'https://api.ipag.com.br'; |
||
10 | public const SANDBOX = 'https://sandbox.ipag.com.br'; |
||
11 | |||
12 | private string $serviceUrl; |
||
|
|||
13 | |||
14 | public function __construct(string $environment) |
||
15 | { |
||
16 | if (!$this->isValidEnv($environment)) |
||
17 | throw new \UnexpectedValueException("The environment must be valid"); |
||
18 | |||
19 | parent::__construct($environment); |
||
20 | } |
||
21 | |||
22 | private function isValidEnv(string $value) |
||
25 | } |
||
26 | |||
27 | } |