Skip to content

Commit c7aac15

Browse files
committed
refactor: replace narrowable mixed PHPDocs with specific types
1 parent ad03579 commit c7aac15

18 files changed

Lines changed: 22 additions & 84 deletions

system/Config/BaseConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function parseEncryptionKey(string $key): string
166166
/**
167167
* Initialization an environment-specific configuration setting
168168
*
169-
* @param array|bool|float|int|string|null $property
169+
* @param array<int|string, mixed>|bool|float|int|string|null $property
170170
*
171171
* @return void
172172
*/

system/Database/BaseBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2805,7 +2805,7 @@ public function getCompiledDelete(bool $reset = true): string
28052805
/**
28062806
* Compiles a delete string and runs the query
28072807
*
2808-
* @param array|RawSql|string $where
2808+
* @param array<int|string, mixed>|RawSql|string $where
28092809
*
28102810
* @return bool|string Returns a SQL string if in test mode.
28112811
*
@@ -3063,7 +3063,7 @@ protected function trackAliases($table)
30633063
* Generates a query string based on which functions were used.
30643064
* Should not be called directly.
30653065
*
3066-
* @param mixed $selectOverride
3066+
* @param false|string $selectOverride
30673067
*/
30683068
protected function compileSelect($selectOverride = false): string
30693069
{

system/Database/BaseConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ abstract protected function execute(string $sql);
781781
* Should automatically handle different connections for read/write
782782
* queries if needed.
783783
*
784-
* @param array|string|null $binds
784+
* @param array<int|string, mixed>|string|null $binds
785785
*
786786
* @return BaseResult<TConnection, TResult>|bool|Query
787787
*

system/Database/BaseUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function optimizeTable(string $tableName)
125125
/**
126126
* Optimize Database
127127
*
128-
* @return mixed
128+
* @return array<string, mixed>|bool
129129
*
130130
* @throws DatabaseException
131131
*/
@@ -170,7 +170,7 @@ public function optimizeDatabase()
170170
/**
171171
* Repair Table
172172
*
173-
* @return mixed
173+
* @return array<string, mixed>|bool
174174
*
175175
* @throws DatabaseException
176176
*/

system/Database/ConnectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getVersion(): string;
100100
* Should automatically handle different connections for read/write
101101
* queries if needed.
102102
*
103-
* @param array|string|null $binds
103+
* @param array<int|string, mixed>|string|null $binds
104104
*
105105
* @return BaseResult<TConnection, TResult>|bool|Query
106106
*/

system/Database/OCI8/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected function _truncate(string $table): string
150150
/**
151151
* Compiles a delete string and runs the query
152152
*
153-
* @param mixed $where
153+
* @param array<int|string, mixed>|RawSql|string $where
154154
*
155155
* @return bool|string
156156
*

system/Database/Postgre/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ protected function _insertBatch(string $table, array $keys, array $values): stri
225225
/**
226226
* Compiles a delete string and runs the query
227227
*
228-
* @param mixed $where
228+
* @param array<int|string, mixed>|RawSql|string $where
229229
*
230230
* @return bool|string
231231
*

system/Database/SQLSRV/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ protected function _delete(string $table): string
538538
/**
539539
* Compiles a delete string and runs the query
540540
*
541-
* @param mixed $where
541+
* @param array<int|string, mixed>|RawSql|string $where
542542
*
543543
* @return bool|string
544544
*
@@ -578,7 +578,7 @@ public function delete($where = '', ?int $limit = null, bool $resetData = true)
578578
*
579579
* Generates a query string based on which functions were used.
580580
*
581-
* @param bool $selectOverride
581+
* @param false|string $selectOverride
582582
*/
583583
protected function compileSelect($selectOverride = false): string
584584
{

system/Database/SQLSRV/Forge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ protected function _alterTable(string $alterType, string $table, $processedField
321321
/**
322322
* Drop index for table
323323
*
324-
* @return mixed
324+
* @return false|resource
325325
*/
326326
protected function _dropIndex(string $table, object $indexData)
327327
{

system/Encryption/Handlers/BaseHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected static function substr($str, $start, $length = null)
5555
*
5656
* @param string $key Property name
5757
*
58-
* @return array|bool|int|string|null
58+
* @return array<int|string, mixed>|bool|int|string|null
5959
*/
6060
public function __get($key)
6161
{

0 commit comments

Comments
 (0)