Skip to content

Commit d021dc8

Browse files
authored
Merge branch 'master' into feature/reactivate-coverage
2 parents 21dbad3 + bbd1cdd commit d021dc8

Some content is hidden

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

68 files changed

+457
-443
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- "8.1"
3636
- "8.2"
3737
- "8.3"
38+
- "8.4"
3839

3940
steps:
4041
- name: Checkout

lib/Doctrine/Cli.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class Doctrine_Cli
7171
/**
7272
* __construct
7373
*
74-
* @param array [$config=array()]
75-
* @param object|null [$formatter=null] Doctrine_Cli_Formatter
74+
* @param array $config
75+
* @param Doctrine_Cli_Formatter|null $formatter
7676
*/
77-
public function __construct(array $config = array(), Doctrine_Cli_Formatter $formatter = null)
77+
public function __construct(array $config = array(), ?Doctrine_Cli_Formatter $formatter = null)
7878
{
7979
$this->setConfig($config);
8080
$this->setFormatter($formatter ? $formatter : new Doctrine_Cli_AnsiColorFormatter());

lib/Doctrine/Collection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -924,10 +924,10 @@ protected function compareRecords($a, $b)
924924
* Saves all records of this collection and processes the
925925
* difference of the last snapshot and the current data
926926
*
927-
* @param Doctrine_Connection $conn optional connection parameter
927+
* @param Doctrine_Connection|null $conn optional connection parameter
928928
* @return Doctrine_Collection
929929
*/
930-
public function save(Doctrine_Connection $conn = null, $processDiff = true)
930+
public function save(?Doctrine_Connection $conn = null, $processDiff = true)
931931
{
932932
if ($conn == null) {
933933
$conn = $this->_table->getConnection();
@@ -959,10 +959,10 @@ public function save(Doctrine_Connection $conn = null, $processDiff = true)
959959
* Replaces all records of this collection and processes the
960960
* difference of the last snapshot and the current data
961961
*
962-
* @param Doctrine_Connection $conn optional connection parameter
962+
* @param Doctrine_Connection|null $conn optional connection parameter
963963
* @return Doctrine_Collection
964964
*/
965-
public function replace(Doctrine_Connection $conn = null, $processDiff = true)
965+
public function replace(?Doctrine_Connection $conn = null, $processDiff = true)
966966
{
967967
if ($conn == null) {
968968
$conn = $this->_table->getConnection();
@@ -995,7 +995,7 @@ public function replace(Doctrine_Connection $conn = null, $processDiff = true)
995995
*
996996
* @return Doctrine_Collection
997997
*/
998-
public function delete(Doctrine_Connection $conn = null, $clearColl = true)
998+
public function delete(?Doctrine_Connection $conn = null, $clearColl = true)
999999
{
10001000
if ($conn == null) {
10011001
$conn = $this->_table->getConnection();

lib/Doctrine/Connection.php

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
* @version $Revision$
5353
* @author Konsta Vesterinen <[email protected]>
5454
* @author Lukas Smith <[email protected]> (MDB2 library)
55+
*
56+
* @property Doctrine_Export $export
5557
*/
5658
abstract class Doctrine_Connection extends Doctrine_Configurable implements Countable, IteratorAggregate, Serializable
5759
{
@@ -241,41 +243,31 @@ public function isConnected()
241243
}
242244

243245
/**
244-
* getOptions
245-
*
246246
* Get array of all options
247247
*
248-
* @return void
248+
* @return array<string, mixed>
249249
*/
250-
public function getOptions()
250+
public function getOptions(): array
251251
{
252252
return $this->options;
253253
}
254254

255255
/**
256-
* getOption
257-
*
258-
* Retrieves option
259-
*
260-
* @param string $option
261-
* @return void
256+
* @return null|mixed
262257
*/
263-
public function getOption($option)
258+
public function getOption(string $option)
264259
{
265260
if (isset($this->options[$option])) {
266261
return $this->options[$option];
267262
}
268263
}
269264

270265
/**
271-
* setOption
272-
*
273266
* Set option value
274267
*
275-
* @param string $option
276-
* @return void
268+
* @return mixed
277269
*/
278-
public function setOption($option, $value)
270+
public function setOption(string $option, $value)
279271
{
280272
return $this->options[$option] = $value;
281273
}
@@ -1545,8 +1537,8 @@ public function dropDatabase()
15451537
* which is always guaranteed to exist. Mysql: 'mysql', PostgreSQL: 'postgres', etc.
15461538
* This value is set in the Doctrine_Export_{DRIVER} classes if required
15471539
*
1548-
* @param string $info
1549-
* @return void
1540+
* @param array $info
1541+
* @return Doctrine_Connection
15501542
*/
15511543
public function getTmpConnection($info)
15521544
{
@@ -1569,7 +1561,7 @@ public function getTmpConnection($info)
15691561
$username = $this->getOption('username');
15701562
$password = $this->getOption('password');
15711563

1572-
$conn = $this->getManager()->openConnection(array($pdoDsn, $username, $password), 'doctrine_tmp_connection', false);
1564+
$conn = $this->getManager()->openConnection([$pdoDsn, $username, $password], 'doctrine_tmp_connection', false);
15731565
$conn->setOption('username', $username);
15741566
$conn->setOption('password', $password);
15751567

lib/Doctrine/Connection/Mssql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ public function quoteIdentifier($identifier, $checkOption = false)
108108
* @param mixed $limit
109109
* @param mixed $offset
110110
* @param boolean $isSubQuery
111-
* @param Doctrine_Query $queryOrigin
111+
* @param Doctrine_Query|null $queryOrigin
112112
* @link https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php#L607
113113
* @link http://www.toosweettobesour.com/2010/09/16/doctrine-1-2-mssql-alternative-limitpaging/
114114
* @return string
115115
*/
116-
public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false, $isSubQuery = false, Doctrine_Query $queryOrigin = null)
116+
public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false, $isSubQuery = false, ?Doctrine_Query $queryOrigin = null)
117117
{
118118
if ($limit === false || !($limit > 0)) {
119119
return $query;

0 commit comments

Comments
 (0)