Skip to content

Commit 402aa86

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent 0a6f4ae commit 402aa86

27 files changed

+36
-19
lines changed

src/Concerns/PostgreSqlSwooleExtManagesTransactions.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Concerns;
1314

1415
use Closure;

src/ConfigProvider.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL;
1314

1415
use Hyperf\Database\PgSQL\Connectors\PostgresConnector;

src/Connectors/PostgresConnector.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Connectors;
1314

1415
use Hyperf\Database\Connectors\Connector;

src/Connectors/PostgresSqlSwooleExtConnector.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Connectors;
1314

1415
use Exception;

src/DBAL/Connection.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\DBAL;
1314

1415
use Doctrine\DBAL\Driver\Result as ResultInterface;

src/DBAL/Exception.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\DBAL;
1314

1415
use Doctrine\DBAL\Driver\Exception as DriverExceptionInterface;
@@ -35,9 +36,6 @@ public function __construct($message, $sqlState = null, $code = 0, ?Throwable $p
3536
$this->sqlState = $sqlState;
3637
}
3738

38-
/**
39-
* {@inheritdoc}
40-
*/
4139
public function getSQLState()
4240
{
4341
return $this->sqlState;

src/DBAL/PostgresDriver.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\DBAL;
1314

1415
use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;

src/DBAL/Result.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\DBAL;
1314

1415
use Doctrine\DBAL\Driver\Result as ResultInterface;
@@ -20,19 +21,16 @@ public function __construct(private PostgreSQLStatement $result)
2021
{
2122
}
2223

23-
/** {@inheritdoc} */
2424
public function fetchNumeric()
2525
{
2626
return $this->result->fetchArray(result_type: SW_PGSQL_NUM);
2727
}
2828

29-
/** {@inheritdoc} */
3029
public function fetchAssociative()
3130
{
3231
return $this->result->fetchAssoc();
3332
}
3433

35-
/** {@inheritdoc} */
3634
public function fetchOne()
3735
{
3836
$row = $this->fetchNumeric();
@@ -43,19 +41,16 @@ public function fetchOne()
4341
return $row[0];
4442
}
4543

46-
/** {@inheritdoc} */
4744
public function fetchAllNumeric(): array
4845
{
4946
return $this->result->fetchAll(SW_PGSQL_NUM);
5047
}
5148

52-
/** {@inheritdoc} */
5349
public function fetchAllAssociative(): array
5450
{
5551
return $this->result->fetchAll(SW_PGSQL_ASSOC);
5652
}
5753

58-
/** {@inheritdoc} */
5954
public function fetchFirstColumn(): array
6055
{
6156
$resultSet = $this->result->fetchAll(SW_PGSQL_NUM);

src/DBAL/Statement.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\DBAL;
1314

1415
use Doctrine\DBAL\Driver\Statement as StatementInterface;
@@ -25,21 +26,18 @@ public function __construct(private PostgreSQLStatement $stmt)
2526
{
2627
}
2728

28-
/** {@inheritdoc} */
2929
public function bindValue($param, $value, $type = ParameterType::STRING): bool
3030
{
3131
$this->parameters[$param] = $value;
3232
return true;
3333
}
3434

35-
/** {@inheritdoc} */
3635
public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null): bool
3736
{
3837
$this->parameters[$param] = &$variable;
3938
return true;
4039
}
4140

42-
/** {@inheritdoc} */
4341
public function execute($params = null): Result
4442
{
4543
if (! empty($params)) {

src/Listener/RegisterConnectionListener.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Listener;
1314

1415
use Hyperf\Database\Connection;

src/PostgreSqlConnection.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL;
1314

1415
use Hyperf\Database\Connection;
@@ -17,6 +18,7 @@
1718
use Hyperf\Database\PgSQL\Query\Processors\PostgresProcessor;
1819
use Hyperf\Database\PgSQL\Schema\Grammars\PostgresGrammar as SchemaGrammar;
1920
use Hyperf\Database\PgSQL\Schema\PostgresBuilder;
21+
use Hyperf\Database\Query\Grammars\PostgresGrammar;
2022
use PDOStatement;
2123

2224
class PostgreSqlConnection extends Connection
@@ -48,7 +50,7 @@ public function bindValues(PDOStatement $statement, array $bindings): void
4850

4951
/**
5052
* Get the default query grammar instance.
51-
* @return \Hyperf\Database\Query\Grammars\PostgresGrammar
53+
* @return PostgresGrammar
5254
*/
5355
protected function getDefaultQueryGrammar(): QueryGrammar
5456
{

src/PostgreSqlSwooleExtConnection.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL;
1314

1415
use Exception;
1516
use Generator;
1617
use Hyperf\Database\Connection;
1718
use Hyperf\Database\Exception\QueryException;
19+
use Hyperf\Database\Grammar;
1820
use Hyperf\Database\PgSQL\Concerns\PostgreSqlSwooleExtManagesTransactions;
1921
use Hyperf\Database\PgSQL\DBAL\PostgresDriver;
2022
use Hyperf\Database\PgSQL\Query\Grammars\PostgresSqlSwooleExtGrammar as QueryGrammar;
@@ -195,7 +197,7 @@ public function unprepared(string $query): bool
195197

196198
/**
197199
* Get the default query grammar instance.
198-
* @return \Hyperf\Database\Grammar
200+
* @return Grammar
199201
*/
200202
protected function getDefaultQueryGrammar(): QueryGrammar
201203
{

src/Query/Grammars/PostgresGrammar.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Query\Grammars;
1314

1415
use Hyperf\Collection\Arr;
@@ -198,8 +199,6 @@ protected function compileUpdateFrom(Builder $query)
198199
}
199200

200201
/**
201-
* {@inheritdoc}
202-
*
203202
* @param array $where
204203
*/
205204
protected function whereBasic(Builder $query, $where): string

src/Query/Grammars/PostgresSqlSwooleExtGrammar.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Query\Grammars;
1314

1415
use Hyperf\Database\PgSQL\Query\Grammars\PostgresGrammar as QueryPostgresGrammar;

src/Query/Processors/PostgresProcessor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Query\Processors;
1314

1415
use Hyperf\Database\Query\Builder;

src/Schema/ForeignIdColumnDefinition.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Schema;
1314

1415
use Hyperf\Database\Schema\Blueprint;
1516
use Hyperf\Database\Schema\ColumnDefinition;
17+
use Hyperf\Database\Schema\ForeignKeyDefinition;
1618
use Hyperf\Stringable\Str;
1719

1820
class ForeignIdColumnDefinition extends ColumnDefinition
@@ -39,7 +41,7 @@ public function __construct(Blueprint $blueprint, $attributes = [])
3941
*
4042
* @param null|string $table
4143
* @param string $column
42-
* @return \Hyperf\Database\Schema\ForeignKeyDefinition
44+
* @return ForeignKeyDefinition
4345
*/
4446
public function constrained($table = null, $column = 'id')
4547
{
@@ -50,7 +52,7 @@ public function constrained($table = null, $column = 'id')
5052
* Specify which column this foreign ID references on another table.
5153
*
5254
* @param string $column
53-
* @return \Hyperf\Database\Schema\ForeignKeyDefinition
55+
* @return ForeignKeyDefinition
5456
*/
5557
public function references($column)
5658
{

src/Schema/Grammars/PostgresGrammar.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Schema\Grammars;
1314

15+
use Hyperf\Database\Connection;
1416
use Hyperf\Database\Schema\Blueprint;
1517
use Hyperf\Database\Schema\Grammars\Grammar;
1618
use Hyperf\Support\Fluent;
@@ -51,7 +53,7 @@ class PostgresGrammar extends Grammar
5153
* Compile a create database command.
5254
*
5355
* @param string $name
54-
* @param \Hyperf\Database\Connection $connection
56+
* @param Connection $connection
5557
*/
5658
public function compileCreateDatabase($name, $connection): string
5759
{

src/Schema/Grammars/PostgresSqlSwooleExtGrammar.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Schema\Grammars;
1314

1415
class PostgresSqlSwooleExtGrammar extends PostgresGrammar

src/Schema/PostgresBuilder.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\PgSQL\Schema;
1314

1415
use Hyperf\Database\PgSQL\Query\Processors\PostgresProcessor;

tests/Cases/DatabasePostgresBuilderTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Hyperf\Database\Connection;

tests/Cases/DatabasePostgresProcessorTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Hyperf\Database\PgSQL\Query\Processors\PostgresProcessor;

tests/Cases/DatabasePostgresQueryGrammarTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Hyperf\Database\Connection;

tests/Cases/DatabasePostgresSchemaGrammarTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Hyperf\Database\Connection;

tests/Cases/PostgreSqlProcessorTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Hyperf\Database\PgSQL\Query\Processors\PostgresProcessor;

tests/Cases/PostgreSqlSwooleExtConnectionTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Cases;
1314

1415
use Exception;

tests/DBAL/ConnectionTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\DBAL;
1314

1415
use Hyperf\Database\PgSQL\DBAL\Connection;

tests/Stubs/ContainerStub.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace HyperfTest\Database\PgSQL\Stubs;
1314

1415
use Hyperf\Context\ApplicationContext;

0 commit comments

Comments
 (0)