Skip to content

Commit d065b96

Browse files
update
1 parent 86bc632 commit d065b96

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/Exceptions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
declare(strict_types=1);
3-
namespace Supabase;
3+
namespace Supabase\Client;
44

5-
class Exception{
5+
class Exceptions extends Exception {
66
public static function Error()
77
{
88
throw new Exception('Error');
9-
}
9+
}
1010
};

src/Functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Supabase;
5-
use Supabase\Supabase;
4+
namespace Supabase\Client;
5+
use Supabase\Client\Supabase;
66

77
class Functions extends Supabase
88
{

src/Supabase.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Supabase;
4+
namespace Supabase\Client;
55
use Exception;
66

77
class Supabase
@@ -20,13 +20,13 @@ public function __construct(?string $url=null, ?string $apikey=null)
2020
if (!isset($url)){
2121
throw new Exception("Supabase URL must be specified");
2222
} elseif(!isset($apikey)){
23-
throw new Exception("Supabase API_KEY must be specified");
23+
throw new Exception("Supabase API_KEY must be specified");
2424
} else {
2525
$this->apikey = $apikey;
2626
$this->url = $url ."/rest/v1";
2727
}
2828
}
29-
29+
3030
protected function grab(string $url, string $method, ?string $data=null)
3131
{
3232
$headers = array(
@@ -69,10 +69,10 @@ protected function grab(string $url, string $method, ?string $data=null)
6969
$error = curl_error($ch);
7070
echo json_encode($error, JSON_PRETTY_PRINT);
7171
}
72-
73-
// Validate HTTP status code
72+
73+
// Validate HTTP status code
7474
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
75-
75+
7676
if ($http_code !== 200) {
7777
echo "Request failed with status code $http_code";
7878
curl_close($ch);

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests;
3+
namespace Supabase\Tests;
44

55
use PHPUnit\Framework\TestCase as BaseTestCase;
66

0 commit comments

Comments
 (0)