diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 6746fe75c..dfb4b3b95 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -842,7 +842,7 @@ App::post('/v1/account/sessions/phone') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('number', '', new ValidatorPhone, 'Phone number.') + ->param('number', '', new ValidatorPhone(), 'Phone number.') ->inject('request') ->inject('response') ->inject('project') diff --git a/app/init.php b/app/init.php index 1782e884a..0c1fe23c5 100644 --- a/app/init.php +++ b/app/init.php @@ -981,4 +981,4 @@ App::setResource('phone', function () { 'telesign' => new Telesign($user, $secret), default => null }; -}); \ No newline at end of file +}); diff --git a/src/Appwrite/Auth/Phone/Mock.php b/src/Appwrite/Auth/Phone/Mock.php index b22ad7a2d..03f4f7073 100644 --- a/src/Appwrite/Auth/Phone/Mock.php +++ b/src/Appwrite/Auth/Phone/Mock.php @@ -9,13 +9,13 @@ class Mock extends Phone /** * @var string */ - static public string $defaultDigits = '123456'; + public static string $defaultDigits = '123456'; /** * @param string $from * @param string $to * @param string $message - * @return void + * @return void */ public function send(string $from, string $to, string $message): void { @@ -24,7 +24,7 @@ class Mock extends Phone /** * @param int $digits - * @return string + * @return string */ public function generateSecretDigits(int $digits = 6): string { diff --git a/src/Appwrite/Auth/Phone/TextMagic.php b/src/Appwrite/Auth/Phone/TextMagic.php index 62e7cbd92..7007c48cf 100644 --- a/src/Appwrite/Auth/Phone/TextMagic.php +++ b/src/Appwrite/Auth/Phone/TextMagic.php @@ -15,10 +15,10 @@ class TextMagic extends Phone private string $endpoint = 'https://rest.textmagic.com/api/v2'; /** - * @param string $from - * @param string $to - * @param string $message - * @return void + * @param string $from + * @param string $to + * @param string $message + * @return void */ public function send(string $from, string $to, string $message): void { diff --git a/src/Appwrite/Auth/Phone/Twilio.php b/src/Appwrite/Auth/Phone/Twilio.php index 8d6e8bc8e..7af581f6d 100644 --- a/src/Appwrite/Auth/Phone/Twilio.php +++ b/src/Appwrite/Auth/Phone/Twilio.php @@ -15,10 +15,10 @@ class Twilio extends Phone private string $endpoint = 'https://api.twilio.com/2010-04-01'; /** - * @param string $from - * @param string $to - * @param string $message - * @return void + * @param string $from + * @param string $to + * @param string $message + * @return void */ public function send(string $from, string $to, string $message): void {