Skip to content

Commit

Permalink
Fix type hints/references.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndm2 committed Sep 23, 2015
1 parent 663fd32 commit 3ac3154
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions src/Datasource/FixtureInterface.php
Expand Up @@ -24,15 +24,15 @@ interface FixtureInterface
/**
* Create the fixture schema/mapping/definition
*
* @param Connection $db An instance of the connection the fixture should be created on.
* @param \Cake\Datasource\ConnectionInterface $db An instance of the connection the fixture should be created on.
* @return bool True on success, false on failure.
*/
public function create(ConnectionInterface $db);

/**
* Run after all tests executed, should remove the table/collection from the connection.
*
* @param Connection $db An instance of the connection the fixture should be removed from.
* @param \Cake\Datasource\ConnectionInterface $db An instance of the connection the fixture should be removed from.
* @return bool True on success, false on failure.
*/
public function drop(ConnectionInterface $db);
Expand All @@ -42,15 +42,15 @@ public function drop(ConnectionInterface $db);
*
* Should insert all the records into the test database.
*
* @param Connection $db An instance of the connection into which the records will be inserted.
* @param \Cake\Datasource\ConnectionInterface $db An instance of the connection into which the records will be inserted.
* @return bool on success or if there are no records to insert, or false on failure.
*/
public function insert(ConnectionInterface $db);

/**
* Truncates the current fixture.
*
* @param Connection $db A reference to a db instance
* @param \Cake\Datasource\ConnectionInterface $db A reference to a db instance
* @return bool
*/
public function truncate(ConnectionInterface $db);
Expand Down
6 changes: 3 additions & 3 deletions src/I18n/Time.php
Expand Up @@ -856,10 +856,10 @@ public static function parseTime($time, $format = null)
/**
* Convenience method for getting the remaining time from a given time.
*
* @param DateTime $datetime The date to get the remaining time from.
* @return DateInterval|bool The DateInterval object representing the difference between the two dates or FALSE on failure.
* @param \DateTime $datetime The date to get the remaining time from.
* @return \DateInterval|bool The DateInterval object representing the difference between the two dates or FALSE on failure.
*/
public static function fromNow($datetime)
public static function fromNow(\DateTime $datetime)
{
$timeNow = new Time();
return $timeNow->diff($datetime);
Expand Down
4 changes: 2 additions & 2 deletions src/Log/LogEngineRegistry.php
Expand Up @@ -62,10 +62,10 @@ protected function _throwMissingClassError($class, $plugin)
*
* Part of the template method for Cake\Core\ObjectRegistry::load()
*
* @param string|LogInterface $class The classname or object to make.
* @param string|\Psr\Log\LoggerInterface $class The classname or object to make.
* @param string $alias The alias of the object.
* @param array $settings An array of settings to use for the logger.
* @return \Cake\Log\LogInterface The constructed logger class.
* @return \Psr\Log\LoggerInterface The constructed logger class.
* @throws \RuntimeException when an object doesn't implement the correct interface.
*/
protected function _create($class, $alias, $settings)
Expand Down
2 changes: 1 addition & 1 deletion src/Log/README.md
Expand Up @@ -6,7 +6,7 @@ possible to send a single message to multiple logging backends at the same time
or just a subset of them based on the log level or context.

By default you can use Files or Syslog as logging backends, but you can use any
object implementing `Psr\Log\LogInterface` as an engine for the `Log` class.
object implementing `Psr\Log\LoggerInterface` as an engine for the `Log` class.

## Usage

Expand Down
20 changes: 10 additions & 10 deletions src/ORM/LazyEagerLoader.php
Expand Up @@ -35,11 +35,11 @@ class LazyEagerLoader
*
* The properties for the associations to be loaded will be overwritten on each entity.
*
* @param Cake\Datasource\EntityInterface|array $entities a single entity or list of entities
* @param \Cake\Datasource\EntityInterface|array $entities a single entity or list of entities
* @param array $contain A `contain()` compatible array.
* @see Cake\ORM\Query\contain()
* @param Cake\ORM\Table $source The table to use for fetching the top level entities
* @return Cake\Datasource\EntityInterface|array
* @param \Cake\ORM\Table $source The table to use for fetching the top level entities
* @return \Cake\Datasource\EntityInterface|array
*/
public function loadInto($entities, array $contain, Table $source)
{
Expand All @@ -62,10 +62,10 @@ public function loadInto($entities, array $contain, Table $source)
* Builds a query for loading the passed list of entity objects along with the
* associations specified in $contain.
*
* @param Cake\Collection\CollectionInterface $objects The original entitites
* @param \Cake\Collection\CollectionInterface $objects The original entitites
* @param array $contain The associations to be loaded
* @param Cake\ORM\Table $source The table to use for fetching the top level entities
* @return Cake\ORM\Query
* @param \Cake\ORM\Table $source The table to use for fetching the top level entities
* @return \Cake\ORM\Query
*/
protected function _getQuery($objects, $contain, $source)
{
Expand Down Expand Up @@ -108,7 +108,7 @@ protected function _getQuery($objects, $contain, $source)
* Returns a map of property names where the association results should be injected
* in the top level entities.
*
* @param Cake\ORM\Table $source The table having the top level associations
* @param \Cake\ORM\Table $source The table having the top level associations
* @param array $associations The name of the top level associations
* @return array
*/
Expand All @@ -126,10 +126,10 @@ protected function _getPropertyMap($source, $associations)
* Injects the results of the eager loader query into the original list of
* entities.
*
* @param array|Traversable $objects The original list of entities
* @param Cake\Collection\CollectionInterface $results The loaded results
* @param array|\Traversable $objects The original list of entities
* @param \Cake\Collection\CollectionInterface $results The loaded results
* @param array $associations The top level associations that were loaded
* @param Cake\ORM\Table $source The table where the entities came from
* @param \Cake\ORM\Table $source The table where the entities came from
* @return array
*/
protected function _injectResults($objects, $results, $associations, $source)
Expand Down
6 changes: 3 additions & 3 deletions src/ORM/Table.php
Expand Up @@ -2220,10 +2220,10 @@ public function buildRules(RulesChecker $rules)
*
* The properties for the associations to be loaded will be overwritten on each entity.
*
* @param Cake\Datasource\EntityInterface|array $entities a single entity or list of entities
* @param \Cake\Datasource\EntityInterface|array $entities a single entity or list of entities
* @param array $contain A `contain()` compatible array.
* @see Cake\ORM\Query\contain()
* @return Cake\Datasource\EntityInterface|array
* @see \Cake\ORM\Query::contain()
* @return \Cake\Datasource\EntityInterface|array
*/
public function loadInto($entities, array $contain)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Route/Route.php
Expand Up @@ -646,7 +646,7 @@ public function staticPath()
* router caching.
*
* @param array $fields Key/Value of object attributes
* @return CakeRoute A new instance of the route
* @return \Cake\Routing\Route\Route A new instance of the route
*/
public static function __set_state($fields)
{
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/TestCase.php
Expand Up @@ -578,7 +578,7 @@ protected function skipUnless($condition, $message = '')
* @param mixed $methods The list of methods to mock
* @param array $options The config data for the mock's constructor.
* @throws \Cake\ORM\Exception\MissingTableClassException
* @return Model
* @return \Cake\ORM\Table|\PHPUnit_Framework_MockObject_MockObject
*/
public function getMockForModel($alias, array $methods = [], array $options = [])
{
Expand Down

0 comments on commit 3ac3154

Please sign in to comment.