Skip to content

Commit 590793e

Browse files
committed
docs: specify phpdoc BaseBuilder
1 parent 7e8ebbc commit 590793e

File tree

2 files changed

+23
-89
lines changed

2 files changed

+23
-89
lines changed

phpstan-baseline.php

Lines changed: 14 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,36 +1791,11 @@
17911791
'count' => 1,
17921792
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
17931793
];
1794-
$ignoreErrors[] = [
1795-
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_deleteBatch\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
1796-
'count' => 1,
1797-
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
1798-
];
1799-
$ignoreErrors[] = [
1800-
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_insert\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
1801-
'count' => 1,
1802-
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
1803-
];
1804-
$ignoreErrors[] = [
1805-
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_insert\\(\\) has parameter \\$unescapedKeys with no value type specified in iterable type array\\.$#',
1806-
'count' => 1,
1807-
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
1808-
];
18091794
$ignoreErrors[] = [
18101795
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_like\\(\\) has parameter \\$field with no value type specified in iterable type array\\.$#',
18111796
'count' => 1,
18121797
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
18131798
];
1814-
$ignoreErrors[] = [
1815-
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_replace\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
1816-
'count' => 1,
1817-
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
1818-
];
1819-
$ignoreErrors[] = [
1820-
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_replace\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
1821-
'count' => 1,
1822-
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
1823-
];
18241799
$ignoreErrors[] = [
18251800
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_update\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
18261801
'count' => 1,
@@ -2206,6 +2181,11 @@
22062181
'count' => 1,
22072182
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
22082183
];
2184+
$ignoreErrors[] = [
2185+
'message' => '#^Parameter \\#3 \\.\\.\\.\\$arrays of function array_map expects array, int\\|string given\\.$#',
2186+
'count' => 1,
2187+
'path' => __DIR__ . '/system/Database/BaseBuilder.php',
2188+
];
22092189
$ignoreErrors[] = [
22102190
'message' => '#^Property CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:\\$QBFrom type has no value type specified in iterable type array\\.$#',
22112191
'count' => 1,
@@ -3121,21 +3101,6 @@
31213101
'count' => 3,
31223102
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
31233103
];
3124-
$ignoreErrors[] = [
3125-
'message' => '#^Method CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:_deleteBatch\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3126-
'count' => 1,
3127-
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
3128-
];
3129-
$ignoreErrors[] = [
3130-
'message' => '#^Method CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:_replace\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
3131-
'count' => 1,
3132-
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
3133-
];
3134-
$ignoreErrors[] = [
3135-
'message' => '#^Method CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:_replace\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3136-
'count' => 1,
3137-
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
3138-
];
31393104
$ignoreErrors[] = [
31403105
'message' => '#^Method CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:_update\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
31413106
'count' => 1,
@@ -3156,6 +3121,11 @@
31563121
'count' => 1,
31573122
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
31583123
];
3124+
$ignoreErrors[] = [
3125+
'message' => '#^Parameter \\#3 \\.\\.\\.\\$arrays of function array_map expects array, int\\|string given\\.$#',
3126+
'count' => 1,
3127+
'path' => __DIR__ . '/system/Database/OCI8/Builder.php',
3128+
];
31593129
$ignoreErrors[] = [
31603130
'message' => '#^Property CodeIgniter\\\\Database\\\\OCI8\\\\Builder\\:\\:\\$randomKeyword type has no value type specified in iterable type array\\.$#',
31613131
'count' => 1,
@@ -3317,27 +3287,17 @@
33173287
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
33183288
];
33193289
$ignoreErrors[] = [
3320-
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:_deleteBatch\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3321-
'count' => 1,
3322-
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
3323-
];
3324-
$ignoreErrors[] = [
3325-
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:_insert\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
3326-
'count' => 1,
3327-
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
3328-
];
3329-
$ignoreErrors[] = [
3330-
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:_insert\\(\\) has parameter \\$unescapedKeys with no value type specified in iterable type array\\.$#',
3290+
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:_update\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
33313291
'count' => 1,
33323292
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
33333293
];
33343294
$ignoreErrors[] = [
3335-
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:_update\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3295+
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:replace\\(\\) has parameter \\$set with no value type specified in iterable type array\\.$#',
33363296
'count' => 1,
33373297
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
33383298
];
33393299
$ignoreErrors[] = [
3340-
'message' => '#^Method CodeIgniter\\\\Database\\\\Postgre\\\\Builder\\:\\:replace\\(\\) has parameter \\$set with no value type specified in iterable type array\\.$#',
3300+
'message' => '#^Parameter \\#3 \\.\\.\\.\\$arrays of function array_map expects array, int\\|string given\\.$#',
33413301
'count' => 1,
33423302
'path' => __DIR__ . '/system/Database/Postgre/Builder.php',
33433303
];
@@ -3676,26 +3636,6 @@
36763636
'count' => 9,
36773637
'path' => __DIR__ . '/system/Database/SQLSRV/Builder.php',
36783638
];
3679-
$ignoreErrors[] = [
3680-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Builder\\:\\:_insert\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
3681-
'count' => 1,
3682-
'path' => __DIR__ . '/system/Database/SQLSRV/Builder.php',
3683-
];
3684-
$ignoreErrors[] = [
3685-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Builder\\:\\:_insert\\(\\) has parameter \\$unescapedKeys with no value type specified in iterable type array\\.$#',
3686-
'count' => 1,
3687-
'path' => __DIR__ . '/system/Database/SQLSRV/Builder.php',
3688-
];
3689-
$ignoreErrors[] = [
3690-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Builder\\:\\:_replace\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
3691-
'count' => 1,
3692-
'path' => __DIR__ . '/system/Database/SQLSRV/Builder.php',
3693-
];
3694-
$ignoreErrors[] = [
3695-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Builder\\:\\:_replace\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3696-
'count' => 1,
3697-
'path' => __DIR__ . '/system/Database/SQLSRV/Builder.php',
3698-
];
36993639
$ignoreErrors[] = [
37003640
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLSRV\\\\Builder\\:\\:_update\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
37013641
'count' => 1,
@@ -3907,17 +3847,7 @@
39073847
'path' => __DIR__ . '/system/Database/SQLite3/Builder.php',
39083848
];
39093849
$ignoreErrors[] = [
3910-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLite3\\\\Builder\\:\\:_deleteBatch\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3911-
'count' => 1,
3912-
'path' => __DIR__ . '/system/Database/SQLite3/Builder.php',
3913-
];
3914-
$ignoreErrors[] = [
3915-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLite3\\\\Builder\\:\\:_replace\\(\\) has parameter \\$keys with no value type specified in iterable type array\\.$#',
3916-
'count' => 1,
3917-
'path' => __DIR__ . '/system/Database/SQLite3/Builder.php',
3918-
];
3919-
$ignoreErrors[] = [
3920-
'message' => '#^Method CodeIgniter\\\\Database\\\\SQLite3\\\\Builder\\:\\:_replace\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#',
3850+
'message' => '#^Parameter \\#3 \\.\\.\\.\\$arrays of function array_map expects array, int\\|string given\\.$#',
39213851
'count' => 1,
39223852
'path' => __DIR__ . '/system/Database/SQLite3/Builder.php',
39233853
];

system/Database/BaseBuilder.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,9 @@ protected function validateInsert(): bool
23762376
/**
23772377
* Generates a platform-specific insert string from the supplied data
23782378
*
2379-
* @param string $table Protected table name
2379+
* @param string $table Protected table name
2380+
* @param list<string> $keys QBKeys
2381+
* @param list<int|string> $unescapedKeys QBSet
23802382
*/
23812383
protected function _insert(string $table, array $keys, array $unescapedKeys): string
23822384
{
@@ -2416,7 +2418,9 @@ public function replace(?array $set = null)
24162418
/**
24172419
* Generates a platform-specific replace string from the supplied data
24182420
*
2419-
* @param string $table Protected table name
2421+
* @param string $table Protected table name
2422+
* @param list<string> $keys QBKeys
2423+
* @param list<int|string> $values QBSet
24202424
*/
24212425
protected function _replace(string $table, array $keys, array $values): string
24222426
{
@@ -2863,9 +2867,9 @@ public function deleteBatch($set = null, $constraints = null, int $batchSize = 1
28632867
*
28642868
* @used-by batchExecute()
28652869
*
2866-
* @param string $table Protected table name
2867-
* @param list<string> $keys QBKeys
2868-
* @param list<string|int> $values QBSet
2870+
* @param string $table Protected table name
2871+
* @param list<string> $keys QBKeys
2872+
* @param list<int|string> $values QBSet
28692873
*/
28702874
protected function _deleteBatch(string $table, array $keys, array $values): string
28712875
{

0 commit comments

Comments
 (0)