Skip to content

Commit ae623f1

Browse files
committed
(style): fix pint issues for PHP 8.3 compatibility
1 parent ca2e1b6 commit ae623f1

97 files changed

Lines changed: 354 additions & 219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
ini_set('memory_limit', '-1');
99

10-
$cli = new CLI;
10+
$cli = new CLI();
1111

1212
include 'tasks/load.php';
1313
include 'tasks/index.php';

bin/tasks/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
->param('sharedTables', false, new Boolean(true), 'Whether to use shared tables', true)
3030
->action(function (string $adapter, string $name, bool $sharedTables) {
3131
$namespace = '_ns';
32-
$cache = new Cache(new NoCache);
32+
$cache = new Cache(new NoCache());
3333

3434
$dbAdapters = [
3535
'mariadb' => [

bin/tasks/load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
$start = null;
6363
$namespace = '_ns';
64-
$cache = new Cache(new NoCache);
64+
$cache = new Cache(new NoCache());
6565

6666
Console::info("Filling {$adapter} with {$limit} records: {$name}");
6767

@@ -125,7 +125,7 @@
125125
);
126126

127127
$pool = new PDOPool(
128-
(new PDOConfig)
128+
(new PDOConfig())
129129
->withDriver($cfg['driver'])
130130
->withHost($cfg['host'])
131131
->withPort($cfg['port'])

bin/tasks/operators.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
->param('name', 'operator_benchmark_'.uniqid(), new Text(0), 'Name of test database', true)
4444
->action(function (string $adapter, int $iterations, int $seed, string $name) {
4545
$namespace = '_ns';
46-
$cache = new Cache(new NoCache);
46+
$cache = new Cache(new NoCache());
4747

4848
Console::info('=============================================================');
4949
Console::info(' OPERATOR PERFORMANCE BENCHMARK');

bin/tasks/query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
};
4343

4444
$namespace = '_ns';
45-
$cache = new Cache(new NoCache);
45+
$cache = new Cache(new NoCache());
4646

4747
// ------------------------------------------------------------------
4848
// Adapter configuration

bin/tasks/relationships.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
->action(function (string $adapter, int $limit, string $name, bool $sharedTables, int $runs) {
4646
$start = null;
4747
$namespace = '_ns';
48-
$cache = new Cache(new NoCache);
48+
$cache = new Cache(new NoCache());
4949

5050
Console::info("Filling {$adapter} with {$limit} records: {$name}");
5151

@@ -176,7 +176,7 @@
176176
$pdo = null;
177177

178178
$pool = new PDOPool(
179-
(new PDOConfig)
179+
(new PDOConfig())
180180
->withHost($cfg['host'])
181181
->withPort($cfg['port'])
182182
->withDbName($name)

src/Database/Adapter/MariaDB.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ protected function getSQLCondition(Query $query, array &$binds): string
12891289
*/
12901290
protected function createBuilder(): \Utopia\Query\Builder\SQL
12911291
{
1292-
return new \Utopia\Query\Builder\MariaDB;
1292+
return new \Utopia\Query\Builder\MariaDB();
12931293
}
12941294

12951295
/**
@@ -1321,7 +1321,7 @@ public function createAttribute(string $collection, Attribute $attribute): bool
13211321

13221322
protected function createSchemaBuilder(): \Utopia\Query\Schema
13231323
{
1324-
return new \Utopia\Query\Schema\MySQL;
1324+
return new \Utopia\Query\Schema\MySQL();
13251325
}
13261326

13271327
protected function getSQLType(string $type, int $size, bool $signed = true, bool $array = false, bool $required = false): string

src/Database/Adapter/Mongo/RetryClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class RetryClient
3030

3131
public function __construct(
3232
private Client $client,
33-
) {}
33+
) {
34+
}
3435

3536
public function unwrap(): Client
3637
{

src/Database/Adapter/MySQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ protected function processException(PDOException $e): \Exception
164164

165165
protected function createBuilder(): \Utopia\Query\Builder\SQL
166166
{
167-
return new \Utopia\Query\Builder\MySQL;
167+
return new \Utopia\Query\Builder\MySQL();
168168
}
169169

170170
/**

src/Database/Adapter/Postgres.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,12 +1761,12 @@ protected function getOperatorBuilderExpression(string $column, Operator $operat
17611761
*/
17621762
protected function createBuilder(): \Utopia\Query\Builder\SQL
17631763
{
1764-
return new \Utopia\Query\Builder\PostgreSQL;
1764+
return new \Utopia\Query\Builder\PostgreSQL();
17651765
}
17661766

17671767
protected function createSchemaBuilder(): \Utopia\Query\Schema
17681768
{
1769-
return new \Utopia\Query\Schema\PostgreSQL;
1769+
return new \Utopia\Query\Schema\PostgreSQL();
17701770
}
17711771

17721772
protected function getSQLType(string $type, int $size, bool $signed = true, bool $array = false, bool $required = false): string

0 commit comments

Comments
 (0)