Skip to content

Commit e2cdbf4

Browse files
authored
Merge pull request #6502 from kenjis/fix-doc-comments-Database
docs: replace mixed in Database doc comments
2 parents 2accd78 + b45760f commit e2cdbf4

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

system/Database/BaseConnection.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @property mixed $encrypt
3434
* @property array $failover
3535
* @property string $hostname
36-
* @property mixed $lastQuery
36+
* @property Query $lastQuery
3737
* @property string $password
3838
* @property bool $pConnect
3939
* @property int|string $port
@@ -154,7 +154,7 @@ abstract class BaseConnection implements ConnectionInterface
154154
/**
155155
* Encryption flag/data
156156
*
157-
* @var mixed
157+
* @var array|bool
158158
*/
159159
protected $encrypt = false;
160160

@@ -185,7 +185,7 @@ abstract class BaseConnection implements ConnectionInterface
185185
* The last query object that was executed
186186
* on this connection.
187187
*
188-
* @var mixed
188+
* @var Query
189189
*/
190190
protected $lastQuery;
191191

@@ -932,7 +932,7 @@ public function prepare(Closure $func, array $options = [])
932932
/**
933933
* Returns the last query's statement object.
934934
*
935-
* @return mixed
935+
* @return Query
936936
*/
937937
public function getLastQuery()
938938
{
@@ -1149,9 +1149,10 @@ private function protectDotItem(string $item, string $alias, bool $protectIdenti
11491149
*
11501150
* This function escapes column and table names
11511151
*
1152-
* @param mixed $item
1152+
* @param array|string $item
11531153
*
1154-
* @return mixed
1154+
* @return array|string
1155+
* @phpstan-return ($item is array ? array : string)
11551156
*/
11561157
public function escapeIdentifiers($item)
11571158
{
@@ -1231,9 +1232,10 @@ abstract public function affectedRows(): int;
12311232
* Escapes data based on type.
12321233
* Sets boolean and null types
12331234
*
1234-
* @param mixed $str
1235+
* @param array|bool|float|int|object|string|null $str
12351236
*
1236-
* @return mixed
1237+
* @return array|float|int|string
1238+
* @phpstan-return ($str is array ? array : float|int|string)
12371239
*/
12381240
public function escape($str)
12391241
{

system/Database/ConnectionInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ public function getLastQuery();
131131
* Escapes data based on type.
132132
* Sets boolean and null types.
133133
*
134-
* @param mixed $str
134+
* @param array|bool|float|int|object|string|null $str
135135
*
136-
* @return mixed
136+
* @return array|float|int|string
137+
* @phpstan-return ($str is array ? array : float|int|string)
137138
*/
138139
public function escape($str);
139140

system/Database/Postgre/Connection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ public function affectedRows(): int
169169
*
170170
* Escapes data based on type
171171
*
172-
* @param mixed $str
172+
* @param array|bool|float|int|object|string|null $str
173173
*
174-
* @return mixed
174+
* @return array|float|int|string
175+
* @phpstan-return ($str is array ? array : float|int|string)
175176
*/
176177
public function escape($str)
177178
{

0 commit comments

Comments
 (0)