@@ -10,8 +10,8 @@ |
||
| 10 | 10 | autofocus |
| 11 | 11 | autocomplete="off" |
| 12 | 12 | autocapitalize="off" |
| 13 | - value="<?php echo isset($_['secret']) ? $_['secret'] : '' ?>" |
|
| 13 | + value="<?php echo isset($_[ 'secret' ]) ? $_[ 'secret' ] : '' ?>" |
|
| 14 | 14 | placeholder="<?php p($l->t('Authentication code')) ?>"> |
| 15 | 15 | <input type="submit" class="confirm-inline icon-confirm" value=""> |
| 16 | - <p><?php p($l->t('An access code has been sent to %s', [$_['phone']])); ?></p> |
|
| 16 | + <p><?php p($l->t('An access code has been sent to %s', [ $_[ 'phone' ] ])); ?></p> |
|
| 17 | 17 | </form> |
@@ -29,12 +29,12 @@ |
||
| 29 | 29 | use OCP\AppFramework\Bootstrap\IBootstrap; |
| 30 | 30 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
| 31 | 31 | |
| 32 | -include_once __DIR__ . '/../../vendor/autoload.php'; |
|
| 32 | +include_once __DIR__.'/../../vendor/autoload.php'; |
|
| 33 | 33 | |
| 34 | 34 | class Application extends App implements IBootstrap { |
| 35 | 35 | public const APP_ID = 'twofactor_gateway'; |
| 36 | 36 | |
| 37 | - public function __construct(array $urlParams = []) { |
|
| 37 | + public function __construct(array $urlParams = [ ]) { |
|
| 38 | 38 | parent::__construct(self::APP_ID, $urlParams); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * @author Christoph Wurst <[email protected]> |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | return new JSONResponse(null, Http::STATUS_BAD_REQUEST); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - return new JSONResponse([]); |
|
| 113 | + return new JSONResponse([ ]); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -56,13 +56,13 @@ |
||
| 56 | 56 | try { |
| 57 | 57 | $this->client->post('https://api.websms.com/rest/smsmessaging/text', [ |
| 58 | 58 | 'headers' => [ |
| 59 | - 'Authorization' => 'Basic ' . base64_encode("$user:$password"), |
|
| 59 | + 'Authorization' => 'Basic '.base64_encode("$user:$password"), |
|
| 60 | 60 | 'Content-Type' => 'application/json', |
| 61 | 61 | ], |
| 62 | 62 | 'json' => [ |
| 63 | 63 | 'messageContent' => $message, |
| 64 | 64 | 'test' => false, |
| 65 | - 'recipientAddressList' => [$identifier], |
|
| 65 | + 'recipientAddressList' => [ $identifier ], |
|
| 66 | 66 | ], |
| 67 | 67 | ]); |
| 68 | 68 | } catch (Exception $ex) { |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | try { |
| 59 | 59 | $this->client->post('https://api.sipgate.com/v2/sessions/sms', [ |
| 60 | 60 | 'headers' => [ |
| 61 | - 'Authorization' => 'Basic ' . base64_encode("$tokenId:$accessToken"), |
|
| 61 | + 'Authorization' => 'Basic '.base64_encode("$tokenId:$accessToken"), |
|
| 62 | 62 | 'Content-Type' => 'application/json', |
| 63 | 63 | 'Accept' => 'application/json', |
| 64 | 64 | ], |
@@ -58,14 +58,14 @@ |
||
| 58 | 58 | [ |
| 59 | 59 | 'headers' => [ |
| 60 | 60 | 'Accept' => 'application/json', |
| 61 | - 'Authorization' => 'Bearer ' . $config->getApiToken(), |
|
| 61 | + 'Authorization' => 'Bearer '.$config->getApiToken(), |
|
| 62 | 62 | 'Content-Type' => 'application/json', |
| 63 | 63 | ], |
| 64 | 64 | 'json' => [ |
| 65 | 65 | 'body' => $message, |
| 66 | 66 | 'encoding' => 'plain', |
| 67 | 67 | 'originator' => 'Nextcloud', |
| 68 | - 'recipients' => [$identifier], |
|
| 68 | + 'recipients' => [ $identifier ], |
|
| 69 | 69 | 'route' => '1', |
| 70 | 70 | ], |
| 71 | 71 | ] |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | private function buildConfigKey(string $gatewayName, string $key) { |
| 44 | - return "$gatewayName" . "_$key"; |
|
| 44 | + return "$gatewayName"."_$key"; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | private function getUserValue(IUser $user, string $gatewayName, string $key, $default = '') { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | protected $l10n; |
| 65 | 65 | |
| 66 | 66 | private function getSessionKey() { |
| 67 | - return "twofactor_gateway_" . $this->gatewayName . "_secret"; |
|
| 67 | + return "twofactor_gateway_".$this->gatewayName."_secret"; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function __construct(string $gatewayId, |