Commit 435747cf by Carsten Brandt

apidoc and codestyle fixes

parent 13ab9e2d
......@@ -44,6 +44,7 @@ class PhpManager extends Manager
private $_children = []; // itemName, childName => child
private $_assignments = []; // userId, itemName => assignment
/**
* Initializes the application component.
* This method overrides parent implementation by loading the authorization data
......@@ -158,7 +159,7 @@ class PhpManager extends Manager
/**
* 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.
* @return Item[] all child items of the parent
*/
......
<?php
/* @var YiiRequirementChecker $this */
/* @var array $summary */
/* @var array[] $requirements */
/**
* @var YiiRequirementChecker $this
* @var array $summary
* @var array[] $requirements
*/
echo "\nYii Application Requirement Checker\n\n";
......
<?php
/* @var YiiRequirementChecker $this */
/* @var array $summary */
/* @var array[] $requirements */
?>
<!DOCTYPE html>
/**
* @var YiiRequirementChecker $this
* @var array $summary
* @var array[] $requirements
*/
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
......
......@@ -233,8 +233,7 @@ class FileValidator extends Validator
public function isEmpty($value, $trim = false)
{
$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
if ($this->_cookies === null) {
$this->_cookies = new CookieCollection;
}
return $this->_cookies;
}
......
......@@ -101,6 +101,7 @@ class UrlRule extends Object implements UrlRuleInterface
*/
private $_routeParams = [];
/**
* Initializes this rule.
*/
......
......@@ -141,8 +141,8 @@ class User extends Component
* @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()]]),
* then this parameter has no effect.
* @return IdentityInterface the identity object associated with the currently logged-in user.
* Null is returned if the user is not logged in (not authenticated).
* @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).
* @see login()
* @see logout()
*/
......@@ -170,7 +170,7 @@ class User extends Component
* [[switchIdentity()]]. Those methods will try to use session and cookie to maintain the user authentication
* 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)
{
......
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