| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Config |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $accountId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $applicationKey; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Config constructor. |
||
| 30 | * @param string $accountId |
||
| 31 | * @param string $applicationKey |
||
| 32 | */ |
||
| 33 | public function __construct($accountId = null, $applicationKey = null) |
||
| 34 | { |
||
| 35 | $this->setAccountId($accountId ?: getenv('DEAR_ACCOUNT_ID')); |
||
| 36 | $this->setApplicationKey($applicationKey ?: getenv('DEAR_APPLICATION_KEY')); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getAccountId() |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $accountId |
||
| 49 | */ |
||
| 50 | public function setAccountId($accountId) |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getApplicationKey() |
||
| 59 | { |
||
| 60 | return $this->applicationKey; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param string $applicationKey |
||
| 65 | */ |
||
| 66 | public function setApplicationKey($applicationKey) |
||
| 69 | } |
||
| 70 | } |