Commit 435747cf by Carsten Brandt

apidoc and codestyle fixes

parent 13ab9e2d
...@@ -44,6 +44,7 @@ class PhpManager extends Manager ...@@ -44,6 +44,7 @@ class PhpManager extends Manager
private $_children = []; // itemName, childName => child private $_children = []; // itemName, childName => child
private $_assignments = []; // userId, itemName => assignment private $_assignments = []; // userId, itemName => assignment
/** /**
* Initializes the application component. * Initializes the application component.
* This method overrides parent implementation by loading the authorization data * This method overrides parent implementation by loading the authorization data
...@@ -158,7 +159,7 @@ class PhpManager extends Manager ...@@ -158,7 +159,7 @@ class PhpManager extends Manager
/** /**
* Returns the children of the specified item. * Returns the children of the specified item.
* @param mixed $names the parent item name. This can be either a string or an array. * @param string|array $names the parent item name. This can be either a string or an array.
* The latter represents a list of item names. * The latter represents a list of item names.
* @return Item[] all child items of the parent * @return Item[] all child items of the parent
*/ */
......
<?php <?php
/* @var YiiRequirementChecker $this */ /**
/* @var array $summary */ * @var YiiRequirementChecker $this
/* @var array[] $requirements */ * @var array $summary
* @var array[] $requirements
*/
echo "\nYii Application Requirement Checker\n\n"; echo "\nYii Application Requirement Checker\n\n";
......
<?php <?php
/* @var YiiRequirementChecker $this */ /**
/* @var array $summary */ * @var YiiRequirementChecker $this
/* @var array[] $requirements */ * @var array $summary
?> * @var array[] $requirements
<!DOCTYPE html> */
?><!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
......
...@@ -232,9 +232,8 @@ class FileValidator extends Validator ...@@ -232,9 +232,8 @@ class FileValidator extends Validator
*/ */
public function isEmpty($value, $trim = false) public function isEmpty($value, $trim = false)
{ {
$value = is_array($value) && !empty($value) ? $value[0] : $value; $value = is_array($value) && !empty($value) ? $value[0] : $value;
return !($value instanceof UploadedFile) || $value->error == UPLOAD_ERR_NO_FILE;
return !$value instanceof UploadedFile || $value->error == UPLOAD_ERR_NO_FILE;
} }
/** /**
......
...@@ -738,7 +738,6 @@ class Response extends \yii\base\Response ...@@ -738,7 +738,6 @@ class Response extends \yii\base\Response
if ($this->_cookies === null) { if ($this->_cookies === null) {
$this->_cookies = new CookieCollection; $this->_cookies = new CookieCollection;
} }
return $this->_cookies; return $this->_cookies;
} }
......
...@@ -101,6 +101,7 @@ class UrlRule extends Object implements UrlRuleInterface ...@@ -101,6 +101,7 @@ class UrlRule extends Object implements UrlRuleInterface
*/ */
private $_routeParams = []; private $_routeParams = [];
/** /**
* Initializes this rule. * Initializes this rule.
*/ */
......
...@@ -141,8 +141,8 @@ class User extends Component ...@@ -141,8 +141,8 @@ class User extends Component
* @param boolean $checkSession whether to check the session if the identity has never been determined before. * @param boolean $checkSession whether to check the session if the identity has never been determined before.
* If the identity is already determined (e.g., by calling [[setIdentity()]] or [[login()]]), * If the identity is already determined (e.g., by calling [[setIdentity()]] or [[login()]]),
* then this parameter has no effect. * then this parameter has no effect.
* @return IdentityInterface the identity object associated with the currently logged-in user. * @return IdentityInterface|null the identity object associated with the currently logged-in user.
* Null is returned if the user is not logged in (not authenticated). * `null` is returned if the user is not logged in (not authenticated).
* @see login() * @see login()
* @see logout() * @see logout()
*/ */
...@@ -170,7 +170,7 @@ class User extends Component ...@@ -170,7 +170,7 @@ class User extends Component
* [[switchIdentity()]]. Those methods will try to use session and cookie to maintain the user authentication * [[switchIdentity()]]. Those methods will try to use session and cookie to maintain the user authentication
* status. * status.
* *
* @param IdentityInterface $identity the identity object associated with the currently logged user. * @param IdentityInterface|null $identity the identity object associated with the currently logged user.
*/ */
public function setIdentity($identity) public function setIdentity($identity)
{ {
......
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