Commit ee8c0404 by Alexander Makarov

minor code style and phpdoc fix

parent c9eca1d5
...@@ -213,7 +213,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface ...@@ -213,7 +213,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/** /**
* PHP getter magic method. * PHP getter magic method.
* This method is overridden so that attributes and related objects can be accessed like properties. * This method is overridden so that attributes and related objects can be accessed like properties.
*
* @param string $name property name * @param string $name property name
* @throws \yii\base\InvalidParamException if relation name is wrong
* @return mixed property value * @return mixed property value
* @see getAttribute() * @see getAttribute()
*/ */
...@@ -237,9 +239,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface ...@@ -237,9 +239,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
} }
} }
return $this->_related[$name] = $value->multiple ? $value->all() : $value->one(); return $this->_related[$name] = $value->multiple ? $value->all() : $value->one();
} else {
return $value;
} }
return $value;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment