Skip to content

Commit 48c45a9

Browse files
committed
Removing include-path, fixing docblock, adding classmap
1 parent 8695cbb commit 48c45a9

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
"Doctrine_": "lib/",
1515
"sfYaml": "lib/Doctrine/Parser/sfYaml/"
1616
},
17-
"files": [
17+
"classmap": [
1818
"lib/Doctrine.php"
1919
]
2020
},
21-
"include-path": [
22-
"lib/"
23-
],
2421
"replace": {
2522
"doctrine/doctrine1": "*"
2623
},

lib/Doctrine/Manager.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,17 @@ public function setQueryRegistry(Doctrine_Query_Registry $registry)
251251
* Open a new connection. If the adapter parameter is set this method acts as
252252
* a short cut for Doctrine_Manager::getInstance()->openConnection($adapter, $name);
253253
*
254-
* if the adapter paramater is not set this method acts as
254+
* if the adapter parameter is not set this method acts as
255255
* a short cut for Doctrine_Manager::getInstance()->getCurrentConnection()
256256
*
257-
* @param PDO|Doctrine_Adapter_Interface $adapter database driver
258-
* @param string $name name of the connection, if empty numeric key is used
259-
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
257+
* @param PDO|Doctrine_Adapter_Interface|array|string|null $adapter database driver, DSN or array of connection options
258+
* @param string $name name of the connection, if empty numeric key is used
259+
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
260260
* @return Doctrine_Connection
261261
*/
262262
public static function connection($adapter = null, $name = null)
263263
{
264-
if ($adapter == null) {
264+
if ($adapter === null) {
265265
return Doctrine_Manager::getInstance()->getCurrentConnection();
266266
} else {
267267
return Doctrine_Manager::getInstance()->openConnection($adapter, $name);
@@ -271,10 +271,10 @@ public static function connection($adapter = null, $name = null)
271271
/**
272272
* Opens a new connection and saves it to Doctrine_Manager->connections
273273
*
274-
* @param PDO|Doctrine_Adapter_Interface|array|string $adapter database driver, DSN or array of connection options
275-
* @param string $name name of the connection, if empty numeric key is used
276-
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
277-
* @throws Doctrine_Manager_Exception if trying to open connection for unknown driver
274+
* @param PDO|Doctrine_Adapter_Interface|array|string $adapter database driver, DSN or array of connection options
275+
* @param string $name name of the connection, if empty numeric key is used
276+
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
277+
* @throws Doctrine_Manager_Exception if trying to open connection for unknown driver
278278
* @return Doctrine_Connection
279279
*/
280280
public function openConnection($adapter, $name = null, $setCurrent = true)

phpstan.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,6 @@ parameters:
425425
- '#Parameter \#1 \$alias of method Doctrine_Query::_processPendingJoinConditions\(\) expects string, string\|null given\.#'
426426
# Same with this one, default for $alias should probably be an empty string, Doctrine_Table:1120
427427
- '#Parameter \#1 \$alias of method Doctrine_Table::processOrderBy\(\) expects string, string\|null given\.#'
428-
# This one has a check for null that will prevent null being passed further, Doctrine_Manager:267
429-
- '#Parameter \#1 \$adapter of method Doctrine_Manager::openConnection\(\) expects array\|Doctrine_Adapter_Interface\|PDO\|string, Doctrine_Adapter_Interface\|PDO\|null given\.#'
430428
# Should change to empty string as default, Doctrine_Import_Schema:271
431429
- '#Parameter \#1 \$path of method Doctrine_Import_Builder::setTargetPath\(\) expects string, string\|null given\.#'
432430
# In Doctrine_Query_Abstract:1616, $from really shouldn't be allowed to be "null" since once it's passed to the _addDqlQueryPart method an

0 commit comments

Comments
 (0)