| Conditions | 9 |
| Paths | 256 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 9 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 29 | public function __construct($params = array()) { |
|
| 13 | 29 | $default_environment = getenv('BOLETOSIMPLES_ENV') ? getenv('BOLETOSIMPLES_ENV') : 'sandbox'; |
|
| 14 | 29 | $default_application_id = getenv('BOLETOSIMPLES_APP_ID') ? getenv('BOLETOSIMPLES_APP_ID') : null; |
|
| 15 | 29 | $default_application_secret = getenv('BOLETOSIMPLES_APP_SECRET') ? getenv('BOLETOSIMPLES_APP_SECRET') : null; |
|
| 16 | 29 | $default_access_token = getenv('BOLETOSIMPLES_ACCESS_TOKEN') ? getenv('BOLETOSIMPLES_ACCESS_TOKEN') : null; |
|
| 17 | |||
| 18 | 29 | $this->environment = isset($params['environment']) ? $params['environment'] : $default_environment; |
|
| 19 | 29 | $this->application_id = isset($params['application_id']) ? $params['application_id'] : $default_application_id; |
|
| 20 | 29 | $this->application_secret = isset($params['application_secret']) ? $params['application_secret'] : $default_application_secret; |
|
| 21 | 29 | $this->access_token = isset($params['access_token']) ? $params['access_token'] : $default_access_token; |
|
| 22 | 29 | } |
|
| 23 | |||
| 36 | } |