| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function __construct(EnabledAvataxConfigurationProviderInterface $enabledAvataxConfigurationProvider) |
||
| 16 | { |
||
| 17 | $this->enabledAvataxConfigurationProvider = $enabledAvataxConfigurationProvider; |
||
| 18 | |||
| 19 | $avataxConfiguration = $this->enabledAvataxConfigurationProvider->getConfiguration(); |
||
| 20 | |||
| 21 | $appName = (string) $avataxConfiguration->getAppName(); |
||
| 22 | $appVersion = (string) $avataxConfiguration->getAppVersion(); |
||
| 23 | $machineName = (string) $avataxConfiguration->getMachineName(); |
||
| 24 | $environment = $avataxConfiguration->isSandbox() === true ? 'sandbox' : 'production'; |
||
| 25 | |||
| 26 | parent::__construct($appName, $appVersion, $machineName, $environment); |
||
| 27 | |||
| 28 | $accountId = (int) $avataxConfiguration->getAccountId(); |
||
| 29 | $licenseKey = (string) $avataxConfiguration->getLicenseKey(); |
||
| 30 | |||
| 31 | $this->withLicenseKey($accountId, $licenseKey); |
||
| 32 | } |
||
| 33 | } |