apidoc and codestyle fixes

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Carsten Brandt
2014-03-26 23:03:02 +01:00
gitea-unlock(16/)
parent 13ab9e2dc1
commit 435747cf98
octicon-diff(16/tw-mr-1) 7 changed files with 19 additions and 16 deletions

3
framework/rbac/PhpManager.php
View File

@@ -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
*/

8
framework/requirements/views/console/index.php
View File

@@ -1,7 +1,9 @@
<?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";

11
framework/requirements/views/web/index.php
View File

@@ -1,9 +1,10 @@
<?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"/>

5
framework/validators/FileValidator.php
View File

@@ -232,9 +232,8 @@ 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;
$value = is_array($value) && !empty($value) ? $value[0] : $value;
return !($value instanceof UploadedFile) || $value->error == UPLOAD_ERR_NO_FILE;
}
/**

1
framework/web/Response.php
View File

@@ -738,7 +738,6 @@ class Response extends \yii\base\Response
if ($this->_cookies === null) {
$this->_cookies = new CookieCollection;
}
return $this->_cookies;
}

1
framework/web/UrlRule.php
View File

@@ -101,6 +101,7 @@ class UrlRule extends Object implements UrlRuleInterface
*/
private $_routeParams = [];
/**
* Initializes this rule.
*/

6
framework/web/User.php
View File

@@ -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)
{