Browse Source

Update docblocks to hint to the ConnectionInterface

Yves P 10 years ago
parent
commit
337bb4428d

+ 4 - 4
src/Database/Query.php

@@ -36,7 +36,7 @@ class Query implements ExpressionInterface, IteratorAggregate
     /**
      * Connection instance to be used to execute this query.
      *
-     * @var \Cake\Database\Connection
+     * @var \Cake\Datasource\ConnectionInterface
      */
     protected $_connection;
 
@@ -124,7 +124,7 @@ class Query implements ExpressionInterface, IteratorAggregate
     /**
      * Constructor.
      *
-     * @param \Cake\Database\Connection $connection The connection
+     * @param \Cake\Datasource\ConnectionInterface $connection The connection
      * object to be used for transforming and executing this query
      */
     public function __construct($connection)
@@ -136,8 +136,8 @@ class Query implements ExpressionInterface, IteratorAggregate
      * Sets the connection instance to be used for executing and transforming this query
      * When called with a null argument, it will return the current connection instance.
      *
-     * @param \Cake\Database\Connection $connection instance
-     * @return $this|\Cake\Database\Connection
+     * @param \Cake\Datasource\ConnectionInterface $connection instance
+     * @return $this|\Cake\Datasource\ConnectionInterface
      */
     public function connection($connection = null)
     {

+ 1 - 1
src/Database/Schema/Collection.php

@@ -30,7 +30,7 @@ class Collection
     /**
      * Connection object
      *
-     * @var \Cake\Database\Connection
+     * @var \Cake\Datasource\ConnectionInterface
      */
     protected $_connection;
 

+ 1 - 1
src/Datasource/ConnectionManager.php

@@ -174,7 +174,7 @@ class ConnectionManager
      *
      * @param string $name The connection name.
      * @param bool $useAliases Set to false to not use aliased connections.
-     * @return \Cake\Database\Connection A connection object.
+     * @return \Cake\Datasource\ConnectionInterface A connection object.
      * @throws \Cake\Datasource\Exception\MissingDatasourceConfigException When config
      * data is missing.
      */

+ 1 - 1
src/ORM/Query.php

@@ -110,7 +110,7 @@ class Query extends DatabaseQuery implements JsonSerializable
     /**
      * Constructor
      *
-     * @param \Cake\Database\Connection $connection The connection object
+     * @param \Cake\Datasource\ConnectionInterface $connection The connection object
      * @param \Cake\ORM\Table $table The table this query is starting on
      */
     public function __construct($connection, $table)

+ 1 - 1
src/ORM/Table.php

@@ -161,7 +161,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
     /**
      * Connection instance
      *
-     * @var \Cake\Database\Connection
+     * @var \Cake\Datasource\ConnectionInterface
      */
     protected $_connection;
 

+ 1 - 1
src/TestSuite/Fixture/FixtureManager.php

@@ -339,7 +339,7 @@ class FixtureManager
      * Creates a single fixture table and loads data into it.
      *
      * @param string $name of the fixture
-     * @param \Cake\Database\Connection $db Connection instance or leave null to get a Connection from the fixture
+     * @param \Cake\Datasource\ConnectionInterface $db Connection instance or leave null to get a Connection from the fixture
      * @param bool $dropTables Whether or not tables should be dropped and re-created.
      * @return void
      * @throws \UnexpectedValueException if $name is not a previously loaded class

+ 1 - 1
tests/TestCase/Database/Schema/MysqlSchemaTest.php

@@ -184,7 +184,7 @@ class MysqlSchemaTest extends TestCase
     /**
      * Helper method for testing methods.
      *
-     * @param \Cake\Database\Connection $connection
+     * @param \Cake\Datasource\ConnectionInterface $connection
      * @return void
      */
     protected function _createTables($connection)

+ 1 - 1
tests/TestCase/Database/Schema/PostgresSchemaTest.php

@@ -41,7 +41,7 @@ class PostgresSchemaTest extends TestCase
     /**
      * Helper method for testing methods.
      *
-     * @param \Cake\Database\Connection $connection
+     * @param \Cake\Datasource\ConnectionInterface $connection
      * @return void
      */
     protected function _createTables($connection)