diff --git a/lib/Doctrine/Access.php b/lib/Doctrine/Access.php index 82204abc9..f066e7f4a 100644 --- a/lib/Doctrine/Access.php +++ b/lib/Doctrine/Access.php @@ -96,10 +96,7 @@ public function __unset($name) } /** - * Check if an offset axists - * - * @param mixed $offset - * @return boolean Whether or not this object contains $offset + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -108,10 +105,6 @@ public function offsetExists($offset) } /** - * An alias of get() - * - * @see get, __get - * @param mixed $offset * @return mixed */ #[\ReturnTypeWillChange] @@ -127,11 +120,6 @@ public function offsetGet($offset) } /** - * Sets $offset to $value - * - * @see set, __set - * @param mixed $offset - * @param mixed $value * @return void */ #[\ReturnTypeWillChange] @@ -145,22 +133,19 @@ public function offsetSet($offset, $value) } /** - * Unset a given offset - * - * @see set, offsetSet, __set - * @param mixed $offset + * @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { - return $this->remove($offset); + $this->remove($offset); } /** * Remove the element with the specified offset * * @param mixed $offset The offset to remove - * @return boolean True if removed otherwise false + * @return bool True if removed otherwise false */ public function remove($offset) { @@ -191,8 +176,8 @@ public function set($offset, $value) } /** - * Check if the specified offset exists - * + * Check if the specified offset exists + * * @param mixed $offset The offset to check * @return boolean True if exists otherwise false */ @@ -202,9 +187,9 @@ public function contains($offset) } /** - * Add the value - * - * @param mixed $value The value to add + * Add the value + * + * @param mixed $value The value to add * @return void */ public function add($value) diff --git a/lib/Doctrine/Connection/Common.php b/lib/Doctrine/Connection/Common.php index 1f1aa21b6..36f7e286c 100644 --- a/lib/Doctrine/Connection/Common.php +++ b/lib/Doctrine/Connection/Common.php @@ -38,12 +38,13 @@ class Doctrine_Connection_Common extends Doctrine_Connection * @param string $query * @param mixed $limit * @param mixed $offset + * @return string */ public function modifyLimitQuery($query, $limit = false,$offset = false,$isManip=false) { $limit = (int) $limit; $offset = (int) $offset; - + if ($limit && $offset) { $query .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; } elseif ($limit && ! $offset) { @@ -54,4 +55,4 @@ public function modifyLimitQuery($query, $limit = false,$offset = false,$isManip return $query; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator.php b/lib/Doctrine/Hydrator.php index 05ab94599..129743e32 100644 --- a/lib/Doctrine/Hydrator.php +++ b/lib/Doctrine/Hydrator.php @@ -51,7 +51,7 @@ public function __construct() /** * Set the hydration mode * - * @param mixed $hydrationMode One of the Doctrine_Core::HYDRATE_* constants or + * @param mixed $hydrationMode One of the Doctrine_Core::HYDRATE_* constants or * a string representing the name of the hydration mode or * or an instance of the hydration class */ @@ -112,9 +112,9 @@ public function getHydratorDriverClassName($mode = null) /** * Get an instance of the hydration driver for the passed hydration mode * - * @param string $mode - * @param array $tableAliases - * @return object Doctrine_Hydrator_Abstract + * @param string $mode + * @param array $tableAliases + * @return Doctrine_Hydrator_Abstract */ public function getHydratorDriver($mode, $tableAliases) { @@ -138,8 +138,8 @@ public function getHydratorDriver($mode, $tableAliases) * Hydrate the query statement in to its final data structure by one of the * hydration drivers. * - * @param object $stmt - * @param array $tableAliases + * @param object $stmt + * @param array $tableAliases * @return mixed $result */ public function hydrateResultSet($stmt, $tableAliases) @@ -149,4 +149,4 @@ public function hydrateResultSet($stmt, $tableAliases) return $result; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/Abstract.php b/lib/Doctrine/Hydrator/Abstract.php index a603e5fd7..3a4dc7dc4 100644 --- a/lib/Doctrine/Hydrator/Abstract.php +++ b/lib/Doctrine/Hydrator/Abstract.php @@ -97,11 +97,11 @@ public function onDemandReset() * (I.e. ORACLE limit/offset emulation adds doctrine_rownum to the result set). * * @param string $name - * @return boolean + * @return bool */ protected function _isIgnoredName($name) { - return $name == 'DOCTRINE_ROWNUM'; + return $name === 'DOCTRINE_ROWNUM'; } /** @@ -114,8 +114,7 @@ protected function _isIgnoredName($name) * The key idea is the loop over the rowset only once doing all the needed operations * within this massive loop. * - * @param mixed $stmt * @return mixed */ abstract public function hydrateResultSet($stmt); -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/ArrayHierarchyDriver.php b/lib/Doctrine/Hydrator/ArrayHierarchyDriver.php index ae281eb47..731ad0090 100644 --- a/lib/Doctrine/Hydrator/ArrayHierarchyDriver.php +++ b/lib/Doctrine/Hydrator/ArrayHierarchyDriver.php @@ -32,6 +32,9 @@ */ class Doctrine_Hydrator_ArrayHierarchyDriver extends Doctrine_Hydrator_ArrayDriver { + /** + * @return array + */ public function hydrateResultSet($stmt) { $collection = parent::hydrateResultSet($stmt); @@ -80,4 +83,4 @@ public function hydrateResultSet($stmt) } return $trees; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/ArrayShallowDriver.php b/lib/Doctrine/Hydrator/ArrayShallowDriver.php index cad4a3424..b595122b6 100644 --- a/lib/Doctrine/Hydrator/ArrayShallowDriver.php +++ b/lib/Doctrine/Hydrator/ArrayShallowDriver.php @@ -32,6 +32,9 @@ */ class Doctrine_Hydrator_ArrayShallowDriver extends Doctrine_Hydrator_ScalarDriver { + /** + * @return array + */ public function hydrateResultSet($stmt) { $cache = array(); @@ -41,4 +44,4 @@ public function hydrateResultSet($stmt) } return $result; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/Graph.php b/lib/Doctrine/Hydrator/Graph.php index bb4ae6a24..8578f4871 100644 --- a/lib/Doctrine/Hydrator/Graph.php +++ b/lib/Doctrine/Hydrator/Graph.php @@ -50,6 +50,9 @@ protected function _getCustomIndexField($alias) return isset($this->_queryComponents[$alias]['map']) ? $this->_queryComponents[$alias]['map'] : null; } + /** + * @return Doctrine_Collection|mixed + */ public function hydrateResultSet($stmt) { // Used variables during hydration diff --git a/lib/Doctrine/Hydrator/NoneDriver.php b/lib/Doctrine/Hydrator/NoneDriver.php index d4ed09dd7..6da15a6d6 100644 --- a/lib/Doctrine/Hydrator/NoneDriver.php +++ b/lib/Doctrine/Hydrator/NoneDriver.php @@ -33,8 +33,11 @@ */ class Doctrine_Hydrator_NoneDriver extends Doctrine_Hydrator_Abstract { + /** + * @return mixed + */ public function hydrateResultSet($stmt) { return $stmt->fetchAll(PDO::FETCH_NUM); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/RecordHierarchyDriver.php b/lib/Doctrine/Hydrator/RecordHierarchyDriver.php index f32055d0f..28c54e20e 100644 --- a/lib/Doctrine/Hydrator/RecordHierarchyDriver.php +++ b/lib/Doctrine/Hydrator/RecordHierarchyDriver.php @@ -32,8 +32,11 @@ */ class Doctrine_Hydrator_RecordHierarchyDriver extends Doctrine_Hydrator_RecordDriver { + /** + * @return Doctrine_Collection + */ public function hydrateResultSet($stmt) { return parent::hydrateResultSet($stmt)->toHierarchy(); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/ScalarDriver.php b/lib/Doctrine/Hydrator/ScalarDriver.php index 894ff3f50..d3ce87e66 100644 --- a/lib/Doctrine/Hydrator/ScalarDriver.php +++ b/lib/Doctrine/Hydrator/ScalarDriver.php @@ -32,6 +32,9 @@ */ class Doctrine_Hydrator_ScalarDriver extends Doctrine_Hydrator_Abstract { + /** + * @return array + */ public function hydrateResultSet($stmt) { $cache = array(); @@ -55,7 +58,7 @@ protected function _gatherRowData($data, &$cache, $aliasPrefix = true) } // cache general information like the column name <-> field name mapping $e = explode('__', $key); - $columnName = strtolower(array_pop($e)); + $columnName = strtolower(array_pop($e)); $cache[$key]['dqlAlias'] = $this->_tableAliases[strtolower(implode('__', $e))]; $table = $this->_queryComponents[$cache[$key]['dqlAlias']]['table']; // check whether it's an aggregate value or a regular field @@ -84,7 +87,7 @@ protected function _gatherRowData($data, &$cache, $aliasPrefix = true) $fieldName = $cache[$key]['fieldName']; $rowDataKey = $aliasPrefix ? $dqlAlias . '_' . $fieldName:$fieldName; - + if ($cache[$key]['isSimpleType'] || $cache[$key]['isAgg']) { $rowData[$rowDataKey] = $value; } else { @@ -94,4 +97,4 @@ protected function _gatherRowData($data, &$cache, $aliasPrefix = true) } return $rowData; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Hydrator/SingleScalarDriver.php b/lib/Doctrine/Hydrator/SingleScalarDriver.php index ebcad6230..bf7589522 100644 --- a/lib/Doctrine/Hydrator/SingleScalarDriver.php +++ b/lib/Doctrine/Hydrator/SingleScalarDriver.php @@ -32,6 +32,10 @@ */ class Doctrine_Hydrator_SingleScalarDriver extends Doctrine_Hydrator_Abstract { + /** + * @param mixed $stmt + * @return array|mixed + */ public function hydrateResultSet($stmt) { $result = array(); @@ -44,4 +48,4 @@ public function hydrateResultSet($stmt) return $result; } } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Locator/Injectable.php b/lib/Doctrine/Locator/Injectable.php index 884042dcd..e46b39c43 100644 --- a/lib/Doctrine/Locator/Injectable.php +++ b/lib/Doctrine/Locator/Injectable.php @@ -66,7 +66,7 @@ public function setLocator(Doctrine_Locator $locator) /** * getLocator * returns the locator associated with this object - * + * * if there are no locator locally associated then * this method tries to fetch the current global locator * @@ -101,7 +101,7 @@ public function locate($name) } else { // get the name of the concrete implementation $concreteImpl = $this->_resources[$name]; - + return $this->getLocator()->locate($concreteImpl); } } else { @@ -115,13 +115,11 @@ public function locate($name) * * @param string $name the name of the resource to bind * @param mixed $value the value of the resource - * @return Doctrine_Locator this object + * @return void */ - public function bind($name, $resource) + public function bind($name, $value) { - $this->_resources[$name] = $resource; - - return $this; + $this->_resources[$name] = $value; } /** @@ -146,4 +144,4 @@ public static function getNullObject() { return self::$_null; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index c64c6465a..2a2d92c06 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -151,7 +151,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count * @var string */ protected $_pendingDeletes = array(); - + /** * Array of pending un links in format alias => keys to be executed after save * @@ -259,7 +259,7 @@ public function __construct($table = null, $isNewEntry = false) } $repository = $this->_table->getRepository(); - + // Fix for #1682 and #1841. // Doctrine_Table does not have the repository yet during dummy record creation. if ($repository) { @@ -399,9 +399,9 @@ public function isValid($deep = false, $hooks = true) $event = new Doctrine_Event($this, Doctrine_Event::RECORD_VALIDATE); $this->preValidate($event); $this->getTable()->getRecordListener()->preValidate($event); - + if ( ! $event->skipOperation) { - + $validator = new Doctrine_Validator(); $validator->validateRecord($this); $this->validate(); @@ -553,7 +553,7 @@ public function postInsert($event) /** * Empty template method to provide concrete Record classes with the possibility - * to hook into the validation procedure. Useful for cleaning up data before + * to hook into the validation procedure. Useful for cleaning up data before * validating it. */ public function preValidate($event) @@ -587,14 +587,14 @@ public function preDqlDelete($event) { } /** - * Empty template method to provide Record classes with the ability to alter hydration + * Empty template method to provide Record classes with the ability to alter hydration * before it runs */ public function preHydrate($event) { } /** - * Empty template method to provide Record classes with the ability to alter hydration + * Empty template method to provide Record classes with the ability to alter hydration * after it runs */ public function postHydrate($event) @@ -633,7 +633,7 @@ public function getErrorStack() if ( ! $this->_errorStack) { $this->_errorStack = new Doctrine_Validator_ErrorStack(get_class($this)); } - + return $this->_errorStack; } @@ -944,7 +944,7 @@ public function state($state = null) if ($state == null) { return $this->_state; } - + $err = false; if (is_integer($state)) { if ($state >= 1 && $state <= 7) { @@ -1090,7 +1090,7 @@ public function clearRelated($name = null) * in order to check. If the reference didn't already exist and it doesn't * exist in the database, the related reference will be cleared immediately. * - * @param string $name + * @param string $name * @return boolean Whether or not the related relationship exists */ public function relatedExists($name) @@ -1170,18 +1170,18 @@ public function load(array $data = array()) // only load the data from database if the Doctrine_Record is in proxy state if ($this->exists() && $this->isInProxyState()) { $id = $this->identifier(); - + if ( ! is_array($id)) { $id = array($id); } - + if (empty($id)) { return false; } $table = $this->getTable(); $data = empty($data) ? $table->find($id, Doctrine_Core::HYDRATE_ARRAY) : $data; - + if (is_array($data)) { foreach ($data as $field => $value) { if ($table->hasField($field) && ( ! array_key_exists($field, $this->_data) || $this->_data[$field] === self::$_null)) { @@ -1189,19 +1189,19 @@ public function load(array $data = array()) } } } - + if ($this->isModified()) { $this->_state = Doctrine_Record::STATE_DIRTY; } else if (!$this->isInProxyState()) { $this->_state = Doctrine_Record::STATE_CLEAN; } - + return true; } - + return false; } - + /** * indicates whether record has any not loaded fields * @@ -1225,8 +1225,8 @@ public function isInProxyState() * sets a fieldname to have a custom accessor or check if a field has a custom * accessor defined (when called without $accessor parameter). * - * @param string $fieldName - * @param string $accessor + * @param string $fieldName + * @param string $accessor * @return boolean */ public function hasAccessor($fieldName, $accessor = null) @@ -1242,7 +1242,7 @@ public function hasAccessor($fieldName, $accessor = null) /** * clears the accessor for a field name * - * @param string $fieldName + * @param string $fieldName * @return void */ public function clearAccessor($fieldName) @@ -1254,7 +1254,7 @@ public function clearAccessor($fieldName) /** * gets the custom accessor for a field name * - * @param string $fieldName + * @param string $fieldName * @return string $accessor */ public function getAccessor($fieldName) @@ -1280,8 +1280,8 @@ public function getAccessors() * sets a fieldname to have a custom mutator or check if a field has a custom * mutator defined (when called without the $mutator parameter) * - * @param string $fieldName - * @param string $mutator + * @param string $fieldName + * @param string $mutator * @return boolean */ public function hasMutator($fieldName, $mutator = null) @@ -1297,7 +1297,7 @@ public function hasMutator($fieldName, $mutator = null) /** * gets the custom mutator for a field name * - * @param string $fieldname + * @param string $fieldname * @return string */ public function getMutator($fieldName) @@ -1311,7 +1311,7 @@ public function getMutator($fieldName) /** * clears the custom mutator for a field name * - * @param string $fieldName + * @param string $fieldName * @return void */ public function clearMutator($fieldName) @@ -1357,7 +1357,7 @@ public function get($fieldName, $load = true) if ($this->_table->getAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE) || $this->hasAccessor($fieldName)) { $componentName = $this->_table->getComponentName(); - $accessor = $this->hasAccessor($fieldName) + $accessor = $this->hasAccessor($fieldName) ? $this->getAccessor($fieldName) : 'get' . Doctrine_Inflector::classify($fieldName); @@ -1388,10 +1388,10 @@ protected function _get($fieldName, $load = true) } else { $value = $this->_data[$fieldName]; } - + return $value; } - + try { if ( ! isset($this->_references[$fieldName])) { if ($load) { @@ -1494,10 +1494,10 @@ protected function _set($fieldName, $value, $load = true) } else { $old = $this->_data[$fieldName]; } - + if ($this->_isValueModified($type, $old, $value)) { if ($value === null) { - $value = $this->_table->getDefaultValueOf($fieldName); + $value = $this->_table->getDefaultValueOf($fieldName); } $this->_data[$fieldName] = $value; $this->_modified[] = $fieldName; @@ -1578,7 +1578,7 @@ protected function _isValueModified($type, $old, $new) /** * Places a related component in the object graph. * - * This method inserts a related component instance in this record + * This method inserts a related component instance in this record * relations, populating the foreign keys accordingly. * * @param string $name related component alias in the relation @@ -1588,11 +1588,11 @@ protected function _isValueModified($type, $old, $new) public function coreSetRelated($name, $value) { $rel = $this->_table->getRelation($name); - + if ($value === null) { $value = self::$_null; } - + // one-to-many or one-to-one relation if ($rel instanceof Doctrine_Relation_ForeignKey || $rel instanceof Doctrine_Relation_LocalKey) { if ( ! $rel->isOneToOne()) { @@ -1782,7 +1782,7 @@ public function replace(Doctrine_Connection $conn = null) /** * retrieves an array of modified fields and associated new values. - * + * * @param boolean $old pick the old values (instead of the new ones) * @param boolean $last pick only lastModified values (@see getLastModified()) * @return array $a @@ -1794,8 +1794,8 @@ public function getModified($old = false, $last = false) $modified = $last ? $this->_lastModified:$this->_modified; foreach ($modified as $fieldName) { if ($old) { - $a[$fieldName] = isset($this->_oldValues[$fieldName]) - ? $this->_oldValues[$fieldName] + $a[$fieldName] = isset($this->_oldValues[$fieldName]) + ? $this->_oldValues[$fieldName] : $this->getTable()->getDefaultValueOf($fieldName); } else { $a[$fieldName] = $this->_data[$fieldName]; @@ -1819,7 +1819,7 @@ public function getLastModified($old = false) * Retrieves data prepared for a sql transaction. * * Returns an array of modified fields and values with data preparation; - * adds column aggregation inheritance and converts Records into primary + * adds column aggregation inheritance and converts Records into primary * key values. * * @param array $array @@ -1914,10 +1914,10 @@ public function toArray($deep = true, $prefixKey = false) if ($this->_state == self::STATE_LOCKED || $this->_state == self::STATE_TLOCKED) { return false; } - + $stateBeforeLock = $this->_state; $this->_state = $this->exists() ? self::STATE_LOCKED : self::STATE_TLOCKED; - + $a = array(); foreach ($this as $column => $value) { @@ -2455,7 +2455,7 @@ public function unlink($alias, $ids = array(), $now = false) // fix for #1622 if ( ! isset($this->_references[$alias]) && $this->hasRelation($alias)) { $this->loadReference($alias); - } + } $allIds = array(); if (isset($this->_references[$alias])) { @@ -2635,8 +2635,8 @@ public function linkInDb($alias, $ids) } /** - * Reset the modified array and store the old array in lastModified so it - * can be accessed by users after saving a record, since the modified array + * Reset the modified array and store the old array in lastModified so it + * can be accessed by users after saving a record, since the modified array * is reset after the object is saved. * * @return void @@ -2689,7 +2689,7 @@ public function deleteNode() { $this->getNode()->delete(); } - + /** * Helps freeing the memory occupied by the entity. * Cuts all references the entity has to other entities and removes the entity diff --git a/lib/Doctrine/Relation.php b/lib/Doctrine/Relation.php index df83c3aa5..cbdcb6ff2 100644 --- a/lib/Doctrine/Relation.php +++ b/lib/Doctrine/Relation.php @@ -41,12 +41,12 @@ abstract class Doctrine_Relation implements ArrayAccess * constant for ONE_TO_ONE and MANY_TO_ONE relationships */ const ONE = 0; - + /** * constant for MANY_TO_MANY and ONE_TO_MANY relationships */ const MANY = 1; - + // TRUE => mandatory, everything else is just a default value. this should be refactored // since TRUE can bot be used as a default value this way. All values should be default values. /** @@ -93,10 +93,10 @@ abstract class Doctrine_Relation implements ArrayAccess * refTable the reference table object (if any) * * onDelete referential delete action - * + * * onUpdate referential update action * - * deferred deferred constraint checking + * deferred deferred constraint checking * * alias relation alias * @@ -114,10 +114,10 @@ abstract class Doctrine_Relation implements ArrayAccess * in the parent table or in the child table. * * SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the - * child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier + * child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier * specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. * - * NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary + * NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary * key value is not allowed to proceed if there is a related foreign key value in the referenced table. * * RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as @@ -135,7 +135,7 @@ public function __construct(array $definition) if (isset($definition[$key])) { $def[$key] = $definition[$key]; } else { - $def[$key] = $this->definition[$key]; + $def[$key] = $this->definition[$key]; } } $this->definition = $def; @@ -169,22 +169,31 @@ public function isEqual() return $this->definition['equal']; } + /** + * @return bool + */ #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->definition[$offset]); } + /** + * @return mixed + */ #[\ReturnTypeWillChange] public function offsetGet($offset) { if (isset($this->definition[$offset])) { return $this->definition[$offset]; } - + return null; } + /** + * @return void + */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { @@ -193,6 +202,9 @@ public function offsetSet($offset, $value) } } + /** + * @return void + */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { @@ -204,7 +216,7 @@ public function offsetUnset($offset) * * @return array */ - public function toArray() + public function toArray() { return $this->definition; } @@ -231,7 +243,7 @@ final public function getType() { return $this->definition['type']; } - + /** * Checks whether this relation cascades deletions to the related objects * on the application level. @@ -277,7 +289,7 @@ final public function getLocal() { return $this->definition['local']; } - + /** * getLocalFieldName * returns the field name of the local column @@ -309,7 +321,7 @@ final public function getForeign() { return $this->definition['foreign']; } - + /** * getLocalFieldName * returns the field name of the foreign column diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 0842bafc8..faac80574 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -963,7 +963,7 @@ public function bind($args, $type) * @param string $componentName the name of the related component * @param string $options relation options * @see Doctrine_Relation::_$definition - * @return Doctrine_Record this object + * @return void */ public function hasOne() { @@ -976,7 +976,7 @@ public function hasOne() * @param string $componentName the name of the related component * @param string $options relation options * @see Doctrine_Relation::_$definition - * @return Doctrine_Record this object + * @return void */ public function hasMany() { @@ -992,7 +992,7 @@ public function hasMany() * side. * * @param string $alias the relation alias to search for. - * @return boolean true if the relation exists. Otherwise false. + * @return bool true if the relation exists. Otherwise false. */ public function hasRelation($alias) {