Skip to content

Commit df588f2

Browse files
github-actionsgithub-actions[bot]
authored andcommitted
style(php-cs-fixer): fix coding standards
1 parent ae321b8 commit df588f2

13 files changed

Lines changed: 20 additions & 33 deletions

File tree

‎src/Database.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ final class Database implements DatabaseInterface
3131
public const ISOLATION_READ_UNCOMMITTED = DriverInterface::ISOLATION_READ_UNCOMMITTED;
3232

3333
/**
34-
* @psalm-param non-empty-string $name Internal database name/id.
3534
*
3635
* @param string $prefix Default database table prefix, will be used for all table identifiers.
3736
* @param DriverInterface $driver Driver instance responsible for database connection.
3837
* @param DriverInterface|null $readDriver Read-only driver connection.
38+
* @psalm-param non-empty-string $name Internal database name/id.
3939
*/
4040
public function __construct(
4141
private string $name,

‎src/DatabaseInterface.php‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ public function table(string $name): TableInterface;
7676
/**
7777
* Execute statement and return number of affected rows.
7878
*
79-
* @psalm-param non-empty-string $query
80-
*
8179
* @param array $parameters Parameters to be binded into query.
80+
* @psalm-param non-empty-string $query
8281
*
8382
* @throws StatementException
8483
*/
@@ -87,9 +86,8 @@ public function execute(string $query, array $parameters = []): int;
8786
/**
8887
* Execute statement and return query iterator.
8988
*
90-
* @psalm-param non-empty-string $query
91-
*
9289
* @param array $parameters Parameters to be binded into query.
90+
* @psalm-param non-empty-string $query
9391
*
9492
* @throws StatementException
9593
*/

‎src/Driver/Compiler.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ protected function deleteQuery(
382382
}
383383

384384
/**
385-
* @psalm-return non-empty-string
386385
* @param mixed $name
386+
* @psalm-return non-empty-string
387387
*/
388388
protected function name(QueryParameters $params, Quoter $q, $name, bool $table = false): string
389389
{
@@ -399,8 +399,8 @@ protected function name(QueryParameters $params, Quoter $q, $name, bool $table =
399399
}
400400

401401
/**
402-
* @psalm-return non-empty-string
403402
* @param mixed $name
403+
* @psalm-return non-empty-string
404404
*/
405405
protected function nameWithAlias(
406406
QueryParameters $params,
@@ -437,8 +437,8 @@ function ($column) use ($params, $q) {
437437
}
438438

439439
/**
440-
* @psalm-return non-empty-string
441440
* @param mixed $value
441+
* @psalm-return non-empty-string
442442
*/
443443
protected function value(QueryParameters $params, Quoter $q, $value): string
444444
{

‎src/Driver/Postgres/Schema/PostgresColumn.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ class PostgresColumn extends AbstractColumn
304304
protected bool $isPrimary = false;
305305

306306
/**
307-
* @psalm-param non-empty-string $table Table name.
308307
*
309308
* @param DriverInterface $driver Postgres columns are bit more complex.
309+
* @psalm-param non-empty-string $table Table name.
310310
*/
311311
public static function createInstance(
312312
string $table,

‎src/Driver/Quoter.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,10 @@ public function identifier(string $identifier): string
9191
/**
9292
* Query query identifier, if identified stated as table - table prefix must be added.
9393
*
94+
* @param bool $isTable Set to true to let quote method know that identifier is related to table name
9495
* @psalm-param non-empty-string $identifier Identifier can include simple column operations and functions,
9596
* having "." in it will automatically force table prefix to first value.
9697
*
97-
* @param bool $isTable Set to true to let quote method know that identifier is related to table name
98-
*
9998
* @psalm-return non-empty-string
10099
*/
101100
public function quote(string $identifier, bool $isTable = false): string

‎src/Driver/SQLServer/Schema/SQLServerColumn.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ class SQLServerColumn extends AbstractColumn
145145
protected string $enumConstraint = '';
146146

147147
/**
148-
* @psalm-param non-empty-string $table Table name.
149148
*
150149
* @param DriverInterface $driver SQLServer columns are bit more complex.
150+
* @psalm-param non-empty-string $table Table name.
151151
*/
152152
public static function createInstance(
153153
string $table,

‎src/Driver/SQLite/SQLiteHandler.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@ private function requiresRebuild(AbstractTable $table): bool
198198
*
199199
* @see http://stackoverflow.com/questions/4007014/alter-column-in-sqlite
200200
*
201+
* @param array $mapping (destination => source)
201202
* @psalm-param non-empty-string $source
202203
* @psalm-param non-empty-string $to
203204
*
204-
* @param array $mapping (destination => source)
205-
*
206205
* @throws HandlerException
207206
*/
208207
private function copyData(string $source, string $to, array $mapping): void

‎src/Query/Traits/HavingTrait.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,10 @@ public function orHaving(mixed ...$args): self
8181
/**
8282
* Convert various amount of where function arguments into valid where token.
8383
*
84-
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
85-
*
8684
* @param array $params Set of parameters collected from where functions.
8785
* @param array $tokens Array to aggregate compiled tokens. Reference.
8886
* @param callable $wrapper Callback or closure used to wrap/collect every potential parameter.
87+
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
8988
*
9089
* @throws BuilderException
9190
*/

‎src/Query/Traits/JoinTrait.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,10 @@ public function orOnWhere(mixed ...$args): self
332332
/**
333333
* Convert various amount of where function arguments into valid where token.
334334
*
335-
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
336-
*
337335
* @param array $params Set of parameters collected from where functions.
338336
* @param array $tokens Array to aggregate compiled tokens. Reference.
339337
* @param callable $wrapper Callback or closure used to wrap/collect every potential parameter.
338+
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
340339
*
341340
* @throws BuilderException
342341
*/

‎src/Query/Traits/TokenTrait.php‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ trait TokenTrait
2222
/**
2323
* Convert various amount of where function arguments into valid where token.
2424
*
25-
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
26-
*
2725
* @param array $params Set of parameters collected from where functions.
2826
* @param array $tokens Array to aggregate compiled tokens. Reference.
2927
* @param callable $wrapper Callback or closure used to wrap/collect every potential parameter.
28+
* @psalm-param non-empty-string $boolean Boolean joiner (AND | OR).
3029
*
3130
* @throws BuilderException
3231
*/
@@ -146,11 +145,10 @@ protected function registerToken(string $boolean, array $params, array &$tokens,
146145
/**
147146
* Convert simplified where definition into valid set of where tokens.
148147
*
149-
* @psalm-param non-empty-string $grouper Grouper type (see self::TOKEN_AND, self::TOKEN_OR).
150-
*
151148
* @param array $where Simplified where definition.
152149
* @param array $tokens Array to aggregate compiled tokens. Reference.
153150
* @param callable $wrapper Callback or closure used to wrap/collect every potential parameter.
151+
* @psalm-param non-empty-string $grouper Grouper type (see self::TOKEN_AND, self::TOKEN_OR).
154152
*
155153
* @throws BuilderException
156154
*/
@@ -224,12 +222,11 @@ private function flattenWhere(string $grouper, array $where, array &$tokens, cal
224222
/**
225223
* Build set of conditions for specified identifier.
226224
*
227-
* @psalm-param non-empty-string $innerJoiner Inner boolean joiner.
228-
* @psalm-param non-empty-string $key Column identifier.
229-
*
230225
* @param array $where Operations associated with identifier.
231226
* @param array $tokens Array to aggregate compiled tokens. Reference.
232227
* @param callable $wrapper Callback or closure used to wrap/collect every potential parameter.
228+
* @psalm-param non-empty-string $innerJoiner Inner boolean joiner.
229+
* @psalm-param non-empty-string $key Column identifier.
233230
*/
234231
private function pushCondition(string $innerJoiner, string $key, array $where, &$tokens, callable $wrapper): array
235232
{

0 commit comments

Comments
 (0)