Skip to content

Commit 15a7a4b

Browse files
committed
CS: method signatures to single line
1 parent b7444cf commit 15a7a4b

File tree

6 files changed

+13
-81
lines changed

6 files changed

+13
-81
lines changed

src/Php84/Resources/stubs/Pdo/Dblib.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ class Dblib extends PDO
2424
public const ATTR_SKIP_EMPTY_ROWSETS = \PHP_VERSION_ID >= 70300 ? PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS : 1005;
2525
public const ATTR_DATETIME_CONVERT = \PHP_VERSION_ID >= 70300 ? \PDO::DBLIB_ATTR_DATETIME_CONVERT : 1006;
2626

27-
public function __construct(
28-
string $dsn,
29-
?string $username = null,
30-
?string $password = null,
31-
?array $options = null
32-
)
27+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
3328
{
3429
parent::__construct($dsn, $username, $password, $options);
3530

src/Php84/Resources/stubs/Pdo/Firebird.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ class Firebird extends PDO
2020
public const ATTR_TIME_FORMAT = PDO::FB_ATTR_TIME_FORMAT;
2121
public const ATTR_TIMESTAMP_FORMAT = PDO::FB_ATTR_TIMESTAMP_FORMAT;
2222

23-
public function __construct(
24-
string $dsn,
25-
?string $username = null,
26-
?string $password = null,
27-
?array $options = null
28-
)
23+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
2924
{
3025
parent::__construct($dsn, $username, $password, $options);
3126

src/Php84/Resources/stubs/Pdo/Mysql.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ class Mysql extends PDO
3939
public const ATTR_SSL_VERIFY_SERVER_CERT = PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT;
4040
public const ATTR_USE_BUFFERED_QUERY = PDO::MYSQL_ATTR_USE_BUFFERED_QUERY;
4141

42-
public function __construct(
43-
string $dsn,
44-
?string $username = null,
45-
?string $password = null,
46-
?array $options = null
47-
)
42+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
4843
{
4944
parent::__construct($dsn, $username, $password, $options);
5045

@@ -77,12 +72,7 @@ class Mysql extends PDO
7772
public const ATTR_SSL_VERIFY_SERVER_CERT = PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT;
7873
public const ATTR_USE_BUFFERED_QUERY = PDO::MYSQL_ATTR_USE_BUFFERED_QUERY;
7974

80-
public function __construct(
81-
string $dsn,
82-
?string $username = null,
83-
?string $password = null,
84-
?array $options = null
85-
)
75+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
8676
{
8777
parent::__construct($dsn, $username, $password, $options);
8878

src/Php84/Resources/stubs/Pdo/Odbc.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ class Odbc extends PDO
2222
public const SQL_USE_DRIVER = PDO::ODBC_SQL_USE_DRIVER;
2323
public const SQL_USE_ODBC = PDO::ODBC_SQL_USE_ODBC;
2424

25-
public function __construct(
26-
string $dsn,
27-
?string $username = null,
28-
?string $password = null,
29-
?array $options = null
30-
)
25+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
3126
{
3227
parent::__construct($dsn, $username, $password, $options);
3328

src/Php84/Resources/stubs/Pdo/Pgsql.php

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ class Pgsql extends PDO
1818
{
1919
public const ATTR_DISABLE_PREPARES = PDO::PGSQL_ATTR_DISABLE_PREPARES;
2020

21-
public function __construct(
22-
string $dsn,
23-
?string $username = null,
24-
?string $password = null,
25-
?array $options = null
26-
)
21+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
2722
{
2823
parent::__construct($dsn, $username, $password, $options);
2924

@@ -33,48 +28,25 @@ public function __construct(
3328
}
3429
}
3530

36-
public function copyFromArray(
37-
string $tableName,
38-
array $rows,
39-
string $separator = "\t",
40-
string $nullAs = "\\\\N",
41-
?string $fields = null
42-
): bool
31+
public function copyFromArray(string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool
4332
{
4433
return $this->pgsqlCopyFromArray($tableName, $rows, $separator, $nullAs, $fields);
4534
}
4635

47-
public function copyFromFile(
48-
string $tableName,
49-
string $filename,
50-
string $separator = "\t",
51-
string $nullAs = "\\\\N",
52-
?string $fields = null
53-
): bool
36+
public function copyFromFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool
5437
{
5538
return $this->pgsqlCopyFromFile($tableName, $filename, $separator, $nullAs, $fields);
5639
}
5740

5841
/**
5942
* @return array|false
6043
*/
61-
public function copyToArray(
62-
string $tableName,
63-
string $separator = "\t",
64-
string $nullAs = "\\\\N",
65-
?string $fields = null
66-
)
44+
public function copyToArray(string $tableName, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null)
6745
{
6846
return $this->pgsqlCopyToArray($tableName, $separator, $nullAs, $fields);
6947
}
7048

71-
public function copyToFile(
72-
string $tableName,
73-
string $filename,
74-
string $separator = "\t",
75-
string $nullAs = "\\\\N",
76-
?string $fields = null
77-
): bool
49+
public function copyToFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool
7850
{
7951
return $this->pgsqlCopyToFile($tableName, $filename, $separator, $nullAs, $fields);
8052
}

src/Php84/Resources/stubs/Pdo/Sqlite.php

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ class Sqlite extends PDO
2424
public const OPEN_READWRITE = \PHP_VERSION_ID >= 70300 ? \PDO::SQLITE_OPEN_READWRITE : 2;
2525
public const OPEN_CREATE = \PHP_VERSION_ID >= 70300 ? \PDO::SQLITE_OPEN_CREATE : 4;
2626

27-
public function __construct(
28-
string $dsn,
29-
?string $username = null,
30-
?string $password = null,
31-
?array $options = null
32-
)
27+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
3328
{
3429
parent::__construct($dsn, $username, $password, $options);
3530

@@ -39,12 +34,7 @@ public function __construct(
3934
}
4035
}
4136

42-
public function createAggregate(
43-
string $name,
44-
callable $step,
45-
callable $finalize,
46-
int $numArgs = -1
47-
): bool
37+
public function createAggregate(string $name, callable $step, callable $finalize, int $numArgs = -1): bool
4838
{
4939
return $this->sqliteCreateAggregate($name, $step, $finalize, $numArgs);
5040
}
@@ -54,12 +44,7 @@ public function createCollation(string $name, callable $callback): bool
5444
return $this->sqliteCreateCollation($name, $callback);
5545
}
5646

57-
public function createFunction(
58-
string $function_name,
59-
callable $callback,
60-
int $num_args = -1,
61-
int $flags = 0
62-
): bool
47+
public function createFunction(string $function_name, callable $callback, int $num_args = -1, int $flags = 0): bool
6348
{
6449
return $this->sqliteCreateFunction($function_name, $callback, $num_args, $flags);
6550
}

0 commit comments

Comments
 (0)