Skip to content

Commit b1f194e

Browse files
wip
1 parent 4ce7028 commit b1f194e

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
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": {

src/Auth/Auth.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
4+
25
namespace Supabase\Auth;
3-
class Auth {
6+
7+
class Auth
8+
{
49
//
510
}

src/Client.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

tests/ClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)