File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 1010 ],
1111 "type" : " library" ,
1212 "require" : {
13- "php" : " ^8.2.0" ,
14- "guzzlehttp/guzzle" : " ^7.9" ,
15- "vlucas/phpdotenv" : " ^5.6"
13+ "php" : " ^8.2.0"
1614 },
1715 "require-dev" : {
16+ "guzzlehttp/guzzle" : " ^7.9" ,
1817 "laravel/pint" : " ^1.22" ,
1918 "phpstan/phpstan" : " ^2.1" ,
2019 "phpstan/phpstan-phpunit" : " ^2.0" ,
21- "phpunit/phpunit" : " ^12.2"
20+ "phpunit/phpunit" : " ^12.2" ,
21+ "vlucas/phpdotenv" : " ^5.6"
2222 },
2323 "license" : " MIT" ,
2424 "autoload" : {
Original file line number Diff line number Diff line change 1- <?php declare (strict_types=1 );
1+ <?php
2+
3+ declare (strict_types=1 );
4+
25namespace Supabase \Auth ;
3- class Auth {
6+
7+ class Auth
8+ {
49 //
510}
Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ class Client
1212
1313 public function __construct (string $ url , string $ key )
1414 {
15- if (!filter_var ($ url , FILTER_VALIDATE_URL )) {
16- throw new \InvalidArgumentException ("Invalid URL: $ url " );
17- } else if (!is_string ($ key )){
18- throw \InvalidArgumentException ("Invalid apiKey: $ key " );
19- }else {
15+ if (! filter_var ($ url , FILTER_VALIDATE_URL )) {
16+ throw new \InvalidArgumentException ("Invalid URL: $ url " );
17+ } else {
2018
21- $ this ->url = $ url ;
22- $ this ->apiKey = $ key ;
19+ $ this ->url = $ url ;
20+ $ this ->apiKey = $ key ;
2321 }
2422 }
2523}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ final class ClientTest extends TestCase
1515 #[Test]
1616 public function it_can_be_instantiated (): void
1717 {
18- $ key = 'test-api-key ' ;
18+ $ key = 'testapikey ' ;
1919 $ url = 'https://api.example.com ' ;
2020
2121 $ client = new Client ($ key , $ url );
@@ -28,7 +28,7 @@ public function it_throws_exception_with_invalid_url(): void
2828 {
2929 $ this ->expectException (\InvalidArgumentException::class);
3030
31- $ key = 'test-api-key ' ;
31+ $ key = 'testapikey ' ;
3232 $ url = 'https://example.com ' ;
3333
3434 new Client ($ key , $ url );
You can’t perform that action at this time.
0 commit comments