@@ -116,10 +116,10 @@ discard block |
||
| 116 | 116 | $this->license->changeLicenseKey($data['licKey']); |
| 117 | 117 | $this->license->addTrial('11'); // MikoPBX forever license |
| 118 | 118 | $res->success = true; |
| 119 | - } elseif ( ! empty($licenseInfo) && strpos($licenseInfo, '2026') !== false) { |
|
| 119 | + } elseif (!empty($licenseInfo) && strpos($licenseInfo, '2026') !== false) { |
|
| 120 | 120 | $res->success = false; |
| 121 | 121 | $res->messages[] = $this->translation->_('lic_FailedCheckLicense2026'); |
| 122 | - } elseif ( ! empty($licenseInfo)) { |
|
| 122 | + } elseif (!empty($licenseInfo)) { |
|
| 123 | 123 | $res->messages[] = $licenseInfo; |
| 124 | 124 | $res->success = false; |
| 125 | 125 | } else { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $res->success = false; |
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | - if ( ! empty($data['coupon'])) { |
|
| 130 | + if (!empty($data['coupon'])) { |
|
| 131 | 131 | $result = $this->license->activateCoupon($data['coupon']); |
| 132 | 132 | if ($result === true) { |
| 133 | 133 | $res->messages[] = $this->translation->_('lic_SuccessfulCouponActivated'); |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | $licFeatureId = $data['licFeatureId']; |
| 212 | 212 | $licProductId = $data['licProductId']; |
| 213 | 213 | |
| 214 | - if ( ! isset($licFeatureId, $licProductId)) { |
|
| 215 | - $res->messages[]='The feature id or product id is empty.'; |
|
| 214 | + if (!isset($licFeatureId, $licProductId)) { |
|
| 215 | + $res->messages[] = 'The feature id or product id is empty.'; |
|
| 216 | 216 | return $res; |
| 217 | 217 | } |
| 218 | 218 | $res->success = true; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | { |
| 243 | 243 | $res = new PBXApiResult(); |
| 244 | 244 | $res->processor = __METHOD__; |
| 245 | - $res->success= true; |
|
| 245 | + $res->success = true; |
|
| 246 | 246 | |
| 247 | 247 | // License Key |
| 248 | 248 | $licenseKey = PbxSettings::getValueByKey('PBXLicense'); |
@@ -250,10 +250,10 @@ discard block |
||
| 250 | 250 | $dataMetrics = []; |
| 251 | 251 | |
| 252 | 252 | // PBXVersion |
| 253 | - $dataMetrics['PBXname'] = 'MikoPBX@' . PbxSettings::getValueByKey('PBXVersion'); |
|
| 253 | + $dataMetrics['PBXname'] = 'MikoPBX@'.PbxSettings::getValueByKey('PBXVersion'); |
|
| 254 | 254 | |
| 255 | 255 | // SIP Extensions count |
| 256 | - $extensions = Extensions::find('type="'.Extensions::TYPE_SIP.'"'); |
|
| 256 | + $extensions = Extensions::find('type="'.Extensions::TYPE_SIP.'"'); |
|
| 257 | 257 | $dataMetrics['CountSipExtensions'] = $extensions->count(); |
| 258 | 258 | |
| 259 | 259 | // Interface language |