Skip to content

Commit 4ef1ac2

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.8
2 parents 1d2489c + 69796fc commit 4ef1ac2

111 files changed

Lines changed: 1637 additions & 4126 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

system/CodeIgniter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ protected function getResponseObject()
552552

553553
/**
554554
* Returns an array with our basic performance stats collected.
555+
*
556+
* @return array{startTime: float|null, totalTime: float}
555557
*/
556558
public function getPerformanceStats(): array
557559
{

system/Database/BaseBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* Provides the core Query Builder methods.
2929
* Database-specific Builders might need to override
3030
* certain methods to make them work.
31+
*
32+
* @template TDb of BaseConnection
3133
*/
3234
class BaseBuilder
3335
{
@@ -205,7 +207,7 @@ class BaseBuilder
205207
/**
206208
* A reference to the database connection.
207209
*
208-
* @var BaseConnection
210+
* @var TDb
209211
*/
210212
protected $db;
211213

@@ -332,7 +334,7 @@ public function __construct($tableName, ConnectionInterface $db, ?array $options
332334
throw new DatabaseException('A table must be specified when creating a new Query Builder.');
333335
}
334336

335-
/** @var BaseConnection $db */
337+
/** @var TDb $db */
336338
$this->db = $db;
337339

338340
if ($tableName instanceof TableName) {

system/Database/BasePreparedQuery.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @template TConnection
2626
* @template TStatement
2727
* @template TResult
28+
* @template TDb of BaseConnection
2829
*
2930
* @implements PreparedQueryInterface<TConnection, TStatement, TResult>
3031
*/
@@ -67,7 +68,7 @@ abstract class BasePreparedQuery implements PreparedQueryInterface
6768
/**
6869
* A reference to the db connection to use.
6970
*
70-
* @var BaseConnection<TConnection, TResult>
71+
* @var TDb
7172
*/
7273
protected $db;
7374

system/Database/BaseResult.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ public function setRow($key, $value = null)
387387

388388
/**
389389
* Returns the "first" row of the current results.
390-
*
391-
* @return array|object|null
392390
*/
393391
public function getFirstRow(string $type = 'object')
394392
{
@@ -399,8 +397,6 @@ public function getFirstRow(string $type = 'object')
399397

400398
/**
401399
* Returns the "last" row of the current results.
402-
*
403-
* @return array|object|null
404400
*/
405401
public function getLastRow(string $type = 'object')
406402
{
@@ -411,8 +407,6 @@ public function getLastRow(string $type = 'object')
411407

412408
/**
413409
* Returns the "next" row of the current results.
414-
*
415-
* @return array|object|null
416410
*/
417411
public function getNextRow(string $type = 'object')
418412
{
@@ -426,8 +420,6 @@ public function getNextRow(string $type = 'object')
426420

427421
/**
428422
* Returns the "previous" row of the current results.
429-
*
430-
* @return array|object|null
431423
*/
432424
public function getPreviousRow(string $type = 'object')
433425
{

system/Database/Forge.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
/**
2222
* The Forge class transforms migrations to executable
2323
* SQL statements.
24+
*
25+
* @template TDb of BaseConnection
2426
*/
2527
class Forge
2628
{
2729
/**
2830
* The active database connection.
2931
*
30-
* @var BaseConnection
32+
* @var TDb
3133
*/
3234
protected $db;
3335

@@ -178,6 +180,8 @@ class Forge
178180

179181
/**
180182
* Constructor.
183+
*
184+
* @param TDb $db
181185
*/
182186
public function __construct(BaseConnection $db)
183187
{

system/Database/MySQLi/Builder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
/**
2121
* Builder for MySQLi
22+
*
23+
* @extends BaseBuilder<Connection>
2224
*/
2325
class Builder extends BaseBuilder
2426
{

system/Database/MySQLi/Forge.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
/**
1919
* Forge for MySQLi
20+
*
21+
* @extends BaseForge<Connection>
2022
*/
2123
class Forge extends BaseForge
2224
{

system/Database/MySQLi/PreparedQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* Prepared query for MySQLi
2525
*
26-
* @extends BasePreparedQuery<mysqli, mysqli_stmt, mysqli_result>
26+
* @extends BasePreparedQuery<mysqli, mysqli_stmt, mysqli_result, Connection>
2727
*/
2828
class PreparedQuery extends BasePreparedQuery
2929
{

system/Database/OCI8/Builder.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
/**
2121
* Builder for OCI8
22+
*
23+
* @extends BaseBuilder<Connection>
2224
*/
2325
class Builder extends BaseBuilder
2426
{
@@ -48,13 +50,6 @@ class Builder extends BaseBuilder
4850
*/
4951
protected $countString = 'SELECT COUNT(1) ';
5052

51-
/**
52-
* A reference to the database connection.
53-
*
54-
* @var Connection
55-
*/
56-
protected $db;
57-
5853
/**
5954
* Generates a platform-specific insert string from the supplied data.
6055
*/

system/Database/OCI8/Connection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class Connection extends BaseConnection
5353
'rownum',
5454
];
5555

56+
/**
57+
* @var array<string, string>
58+
*/
5659
protected $validDSNs = [
5760
// TNS
5861
'tns' => '/^\(DESCRIPTION=(\(.+\)){2,}\)$/',
@@ -79,6 +82,8 @@ class Connection extends BaseConnection
7982
*
8083
* Used by storedProcedure() to prevent execute() from
8184
* re-setting the statement ID.
85+
*
86+
* @var bool
8287
*/
8388
protected $resetStmtId = true;
8489

0 commit comments

Comments
 (0)