Commit fe14f0c5 by Carsten Brandt

fixed all the PHPdoc in extensions

parent 91965fd3
......@@ -202,39 +202,50 @@ class PhpDocController extends Controller
{
$docBlock = false;
$codeBlock = false;
$listIndent = false;
$listIndent = '';
$tag = false;
$indent = '';
foreach($lines as $i => $line) {
if (preg_match('~^(\s*)/\*\*$~', $line, $matches)) {
$docBlock = true;
$indent = $matches[1];
} elseif (preg_match('~^(\s+)\*+/~', $line)) {
} elseif (preg_match('~^(\s*)\*+/~', $line)) {
if ($docBlock) { // could be the end of normal comment
$lines[$i] = $indent . ' */';
}
$docBlock = false;
$codeBlock = false;
$listIndent = '';
$tag = false;
} elseif ($docBlock) {
$docLine = str_replace("\t", ' ', rtrim(substr(ltrim($line), 2)));
$line = ltrim($line);
if (isset($line[0]) && $line[0] === '*') {
$line = substr($line, 1);
}
if (isset($line[0]) && $line[0] === ' ') {
$line = substr($line, 1);
}
$docLine = str_replace("\t", ' ', rtrim($line));
if (empty($docLine)) {
$listIndent = '';
} elseif ($docLine[0] === '@') {
$listIndent = '';
$codeBlock = false;
$tag = true;
$docLine = preg_replace('/\s+/', ' ', $docLine);
} elseif (preg_match('/^(~~~|```)/', $docLine)) {
$codeBlock = !$codeBlock;
$listIndent = '';
} elseif (preg_match('/^(\s*)([0-9]+\.|-|\*|\+) /', $docLine, $matches)) {
$listIndent = str_repeat(' ', strlen($matches[0]));
$tag = false;
$lines[$i] = $indent . ' * ' . $docLine;
continue;
}
if ($codeBlock) {
$lines[$i] = rtrim($indent . ' * ' . $docLine);
} else {
$lines[$i] = rtrim($indent . ' * ' . (empty($listIndent) ? $docLine : ($listIndent . ltrim($docLine))));
$lines[$i] = rtrim($indent . ' * ' . (empty($listIndent) && !$tag ? $docLine : ($listIndent . ltrim($docLine))));
}
}
}
......
......@@ -32,8 +32,8 @@ class ApiController extends BaseController
/**
* Renders API documentation files
* @param array $sourceDirs
* @param string $targetDir
* @param array $sourceDirs
* @param string $targetDir
* @return int
*/
public function actionIndex(array $sourceDirs, $targetDir)
......
......@@ -30,8 +30,8 @@ class GuideController extends BaseController
/**
* Renders API documentation files
* @param array $sourceDirs
* @param string $targetDir
* @param array $sourceDirs
* @param string $targetDir
* @return int
*/
public function actionIndex(array $sourceDirs, $targetDir)
......
......@@ -118,7 +118,7 @@ abstract class BaseController extends Controller
}
/**
* @param string $template
* @param string $template
* @return BaseRenderer
*/
abstract protected function findRenderer($template);
......
......@@ -231,9 +231,9 @@ class ApiMarkdown extends GithubMarkdown
/**
* Converts markdown into HTML
*
* @param string $content
* @param TypeDoc $context
* @param boolean $paragraph
* @param string $content
* @param TypeDoc $context
* @param boolean $paragraph
* @return string
*/
public static function process($content, $context = null, $paragraph = false)
......
......@@ -26,7 +26,7 @@ class PrettyPrinter extends \phpDocumentor\Reflection\PrettyPrinter
/**
* Returns a simple human readable output for a value.
*
* @param PHPParser_Node_Expr $value The value node as provided by PHP-Parser.
* @param PHPParser_Node_Expr $value The value node as provided by PHP-Parser.
* @return string
*/
public static function getRepresentationOfValue(PHPParser_Node_Expr $value)
......
......@@ -44,8 +44,8 @@ class BaseDoc extends Object
/**
* @param \phpDocumentor\Reflection\BaseReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -76,8 +76,8 @@ class ClassDoc extends TypeDoc
/**
* @param \phpDocumentor\Reflection\ClassReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -20,8 +20,8 @@ class ConstDoc extends BaseDoc
/**
* @param \phpDocumentor\Reflection\ClassReflector\ConstantReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -175,7 +175,7 @@ class Context extends Component
/**
* @param MethodDoc $method
* @param ClassDoc $parent
* @param ClassDoc $parent
*/
private function inheritMethodRecursive($method, $class)
{
......@@ -271,8 +271,8 @@ class Context extends Component
}
/**
* @param MethodDoc $method
* @param integer $number number of not optional parameters
* @param MethodDoc $method
* @param integer $number number of not optional parameters
* @return bool
*/
private function paramsOptional($method, $number = 0)
......@@ -287,7 +287,7 @@ class Context extends Component
}
/**
* @param MethodDoc $method
* @param MethodDoc $method
* @return ParamDoc
*/
private function getFirstNotOptionalParameter($method)
......@@ -302,8 +302,8 @@ class Context extends Component
}
/**
* @param ClassDoc $classA
* @param ClassDoc|string $classB
* @param ClassDoc $classA
* @param ClassDoc|string $classB
* @return boolean
*/
protected function isSubclassOf($classA, $classB)
......
......@@ -22,8 +22,8 @@ class EventDoc extends ConstDoc
/**
* @param \phpDocumentor\Reflection\ClassReflector\ConstantReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -32,8 +32,8 @@ class FunctionDoc extends BaseDoc
/**
* @param \phpDocumentor\Reflection\FunctionReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -22,8 +22,8 @@ class InterfaceDoc extends TypeDoc
/**
* @param \phpDocumentor\Reflection\InterfaceReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -27,8 +27,8 @@ class MethodDoc extends FunctionDoc
/**
* @param \phpDocumentor\Reflection\ClassReflector\MethodReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -32,8 +32,8 @@ class ParamDoc extends Object
/**
* @param \phpDocumentor\Reflection\FunctionReflector\ArgumentReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -44,8 +44,8 @@ class PropertyDoc extends BaseDoc
/**
* @param \phpDocumentor\Reflection\ClassReflector\PropertyReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -23,8 +23,8 @@ class TraitDoc extends TypeDoc
/**
* @param \phpDocumentor\Reflection\TraitReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -131,8 +131,8 @@ class TypeDoc extends BaseDoc
}
/**
* @param null $visibility
* @param null $definedBy
* @param null $visibility
* @param null $definedBy
* @return PropertyDoc[]
*/
private function getFilteredProperties($visibility = null, $definedBy = null)
......@@ -156,8 +156,8 @@ class TypeDoc extends BaseDoc
/**
* @param \phpDocumentor\Reflection\InterfaceReflector $reflector
* @param Context $context
* @param array $config
* @param Context $context
* @param array $config
*/
public function __construct($reflector = null, $context = null, $config = [])
{
......
......@@ -122,9 +122,9 @@ abstract class BaseRenderer extends Component
/**
* creates a link to a subject
* @param PropertyDoc|MethodDoc|ConstDoc|EventDoc $subject
* @param string $title
* @param array $options additional HTML attributes for the link.
* @param PropertyDoc|MethodDoc|ConstDoc|EventDoc $subject
* @param string $title
* @param array $options additional HTML attributes for the link.
* @return string
*/
public function createSubjectLink($subject, $title = null, $options = [])
......@@ -177,7 +177,7 @@ abstract class BaseRenderer extends Component
* generate link markup
* @param $text
* @param $href
* @param array $options additional HTML attributes for the link.
* @param array $options additional HTML attributes for the link.
* @return mixed
*/
abstract protected function generateLink($text, $href, $options = []);
......@@ -191,7 +191,7 @@ abstract class BaseRenderer extends Component
/**
* Generate an url to a guide page
* @param string $file
* @param string $file
* @return string
*/
public function generateGuideUrl($file)
......
......@@ -117,11 +117,11 @@ class SideNavWidget extends \yii\bootstrap\Widget
/**
* Renders a widget's item.
* @param string|array $item the item to render.
* @param boolean $collapsed whether to collapse item if not active
* @param string|array $item the item to render.
* @param boolean $collapsed whether to collapse item if not active
* @throws \yii\base\InvalidConfigException
* @return string the rendering result.
* @throws InvalidConfigException if label is not defined
* @return string the rendering result.
* @throws InvalidConfigException if label is not defined
*/
public function renderItem($item, $collapsed = true)
{
......
......@@ -138,7 +138,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param ClassDoc $class
* @param ClassDoc $class
* @return string
*/
public function renderInheritance($class)
......@@ -159,7 +159,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param array $names
* @param array $names
* @return string
*/
public function renderInterfaces($names)
......@@ -178,7 +178,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param array $names
* @param array $names
* @return string
*/
public function renderTraits($names)
......@@ -197,7 +197,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param array $names
* @param array $names
* @return string
*/
public function renderClasses($names)
......@@ -216,7 +216,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param PropertyDoc $property
* @param PropertyDoc $property
* @return string
*/
public function renderPropertySignature($property)
......@@ -238,7 +238,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
/**
* @param MethodDoc $method
* @param MethodDoc $method
* @return string
*/
public function renderMethodSignature($method)
......
......@@ -177,8 +177,8 @@ class AuthAction extends Action
}
/**
* @param mixed $client auth client instance.
* @return Response response instance.
* @param mixed $client auth client instance.
* @return Response response instance.
* @throws \yii\base\NotSupportedException on invalid client.
*/
protected function auth($client)
......@@ -196,9 +196,9 @@ class AuthAction extends Action
/**
* This method is invoked in case of successful authentication via auth client.
* @param ClientInterface $client auth client instance.
* @param ClientInterface $client auth client instance.
* @throws InvalidConfigException on invalid success callback.
* @return Response response instance.
* @return Response response instance.
*/
protected function authSuccess($client)
{
......@@ -214,8 +214,8 @@ class AuthAction extends Action
/**
* Redirect to the given URL or simply close the popup window.
* @param mixed $url URL to redirect, could be a string or array config to generate a valid URL.
* @param boolean $enforceRedirect indicates if redirect should be performed even in case of popup window.
* @param mixed $url URL to redirect, could be a string or array config to generate a valid URL.
* @param boolean $enforceRedirect indicates if redirect should be performed even in case of popup window.
* @return \yii\web\Response response instance.
*/
public function redirect($url, $enforceRedirect = true)
......@@ -237,7 +237,7 @@ class AuthAction extends Action
/**
* Redirect to the URL. If URL is null, {@link successUrl} will be used.
* @param string $url URL to redirect.
* @param string $url URL to redirect.
* @return \yii\web\Response response instance.
*/
public function redirectSuccess($url = null)
......@@ -250,7 +250,7 @@ class AuthAction extends Action
/**
* Redirect to the {@link cancelUrl} or simply close the popup window.
* @param string $url URL to redirect.
* @param string $url URL to redirect.
* @return \yii\web\Response response instance.
*/
public function redirectCancel($url = null)
......@@ -263,9 +263,9 @@ class AuthAction extends Action
/**
* Performs OpenID auth flow.
* @param OpenId $client auth client instance.
* @return Response action response.
* @throws Exception on failure.
* @param OpenId $client auth client instance.
* @return Response action response.
* @throws Exception on failure.
* @throws HttpException on failure.
*/
protected function authOpenId($client)
......@@ -296,7 +296,7 @@ class AuthAction extends Action
/**
* Performs OAuth1 auth flow.
* @param OAuth1 $client auth client instance.
* @param OAuth1 $client auth client instance.
* @return Response action response.
*/
protected function authOAuth1($client)
......@@ -326,8 +326,8 @@ class AuthAction extends Action
/**
* Performs OAuth2 auth flow.
* @param OAuth2 $client auth client instance.
* @return Response action response.
* @param OAuth2 $client auth client instance.
* @return Response action response.
* @throws \yii\base\Exception on failure.
*/
protected function authOAuth2($client)
......
......@@ -227,7 +227,7 @@ abstract class BaseClient extends Component implements ClientInterface
/**
* Normalize given user attributes according to {@link normalizeUserAttributeMap}.
* @param array $attributes raw attributes.
* @param array $attributes raw attributes.
* @return array normalized attributes.
*/
protected function normalizeUserAttributes($attributes)
......
......@@ -130,8 +130,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
}
/**
* @param array|signature\BaseMethod $signatureMethod signature method instance or its array configuration.
* @throws InvalidParamException on wrong argument.
* @param array|signature\BaseMethod $signatureMethod signature method instance or its array configuration.
* @throws InvalidParamException on wrong argument.
*/
public function setSignatureMethod($signatureMethod)
{
......@@ -164,10 +164,10 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Sends HTTP request.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array response.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array response.
* @throws Exception on failure.
*/
protected function sendRequest($method, $url, array $params = [])
......@@ -208,9 +208,9 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
* Merge CUrl options.
* If each options array has an element with the same key value, the latter
* will overwrite the former.
* @param array $options1 options to be merged to.
* @param array $options2 options to be merged from. You can specify additional
* arrays via third argument, fourth argument etc.
* @param array $options1 options to be merged to.
* @param array $options2 options to be merged from. You can specify additional
* arrays via third argument, fourth argument etc.
* @return array merged options (the original options are not changed.)
*/
protected function mergeCurlOptions($options1, $options2)
......@@ -243,10 +243,10 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Processes raw response converting it to actual data.
* @param string $rawResponse raw response.
* @param string $contentType response content type.
* @param string $rawResponse raw response.
* @param string $contentType response content type.
* @throws Exception on failure.
* @return array actual response.
* @return array actual response.
*/
protected function processResponse($rawResponse, $contentType = self::CONTENT_TYPE_AUTO)
{
......@@ -288,8 +288,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Converts XML document to array.
* @param string|\SimpleXMLElement $xml xml to process.
* @return array XML array representation.
* @param string|\SimpleXMLElement $xml xml to process.
* @return array XML array representation.
*/
protected function convertXmlToArray($xml)
{
......@@ -308,7 +308,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Attempts to determine HTTP request content type by headers.
* @param array $headers request headers.
* @param array $headers request headers.
* @return string content type.
*/
protected function determineContentTypeByHeaders(array $headers)
......@@ -330,7 +330,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Attempts to determine the content type from raw content.
* @param string $rawContent raw response content.
* @param string $rawContent raw response content.
* @return string response type.
*/
protected function determineContentTypeByRaw($rawContent)
......@@ -350,7 +350,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Creates signature method instance from its configuration.
* @param array $signatureMethodConfig signature method configuration.
* @param array $signatureMethodConfig signature method configuration.
* @return signature\BaseMethod signature method instance.
*/
protected function createSignatureMethod(array $signatureMethodConfig)
......@@ -364,7 +364,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Creates token from its configuration.
* @param array $tokenConfig token configuration.
* @param array $tokenConfig token configuration.
* @return OAuthToken token instance.
*/
protected function createToken(array $tokenConfig = [])
......@@ -378,8 +378,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Composes URL from base URL and GET params.
* @param string $url base URL.
* @param array $params GET params.
* @param string $url base URL.
* @param array $params GET params.
* @return string composed URL.
*/
protected function composeUrl($url, array $params = [])
......@@ -396,8 +396,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Saves token as persistent state.
* @param OAuthToken $token auth token
* @return static self reference.
* @param OAuthToken $token auth token
* @return static self reference.
*/
protected function saveAccessToken(OAuthToken $token)
{
......@@ -423,8 +423,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Sets persistent state.
* @param string $key state key.
* @param mixed $value state value
* @param string $key state key.
* @param mixed $value state value
* @return static self reference.
*/
protected function setState($key, $value)
......@@ -438,8 +438,8 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Returns persistent state value.
* @param string $key state key.
* @return mixed state value.
* @param string $key state key.
* @return mixed state value.
*/
protected function getState($key)
{
......@@ -452,7 +452,7 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Removes persistent state value.
* @param string $key state key.
* @param string $key state key.
* @return boolean success.
*/
protected function removeState($key)
......@@ -475,10 +475,10 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Performs request to the OAuth API.
* @param string $apiSubUrl API sub URL, which will be append to [[apiBaseUrl]], or absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response
* @param string $apiSubUrl API sub URL, which will be append to [[apiBaseUrl]], or absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response
* @throws Exception on failure.
*/
public function api($apiSubUrl, $method = 'GET', array $params = [])
......@@ -498,29 +498,29 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
/**
* Composes HTTP request CUrl options, which will be merged with the default ones.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @throws Exception on failure.
*/
abstract protected function composeRequestCurlOptions($method, $url, array $params);
/**
* Gets new auth token to replace expired one.
* @param OAuthToken $token expired auth token.
* @param OAuthToken $token expired auth token.
* @return OAuthToken new auth token.
*/
abstract public function refreshAccessToken(OAuthToken $token);
/**
* Performs request to the OAuth API.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
*/
abstract protected function apiInternal($accessToken, $url, $method, array $params);
}
......@@ -69,8 +69,8 @@ class Collection extends Component
}
/**
* @param string $id service id.
* @return ClientInterface auth client instance.
* @param string $id service id.
* @return ClientInterface auth client instance.
* @throws InvalidParamException on non existing client request.
*/
public function getClient($id)
......@@ -87,7 +87,7 @@ class Collection extends Component
/**
* Checks if client exists in the hub.
* @param string $id client id.
* @param string $id client id.
* @return boolean whether client exist.
*/
public function hasClient($id)
......@@ -97,8 +97,8 @@ class Collection extends Component
/**
* Creates auth client instance from its array configuration.
* @param string $id auth client id.
* @param array $config auth client instance configuration.
* @param string $id auth client id.
* @param array $config auth client instance configuration.
* @return ClientInterface auth client instance.
*/
protected function createClient($id, $config)
......
......@@ -64,7 +64,7 @@ class OAuth1 extends BaseOAuth
/**
* Fetches the OAuth request token.
* @param array $params additional request params.
* @param array $params additional request params.
* @return OAuthToken request token.
*/
public function fetchRequestToken(array $params = [])
......@@ -89,10 +89,10 @@ class OAuth1 extends BaseOAuth
/**
* Composes user authorization URL.
* @param OAuthToken $requestToken OAuth request token.
* @param array $params additional request params.
* @return string authorize URL
* @throws Exception on failure.
* @param OAuthToken $requestToken OAuth request token.
* @param array $params additional request params.
* @return string authorize URL
* @throws Exception on failure.
*/
public function buildAuthUrl(OAuthToken $requestToken = null, array $params = [])
{
......@@ -109,11 +109,11 @@ class OAuth1 extends BaseOAuth
/**
* Fetches OAuth access token.
* @param OAuthToken $requestToken OAuth request token.
* @param string $oauthVerifier OAuth verifier.
* @param array $params additional request params.
* @param OAuthToken $requestToken OAuth request token.
* @param string $oauthVerifier OAuth verifier.
* @param array $params additional request params.
* @return OAuthToken OAuth access token.
* @throws Exception on failure.
* @throws Exception on failure.
*/
public function fetchAccessToken(OAuthToken $requestToken = null, $oauthVerifier = null, array $params = [])
{
......@@ -148,10 +148,10 @@ class OAuth1 extends BaseOAuth
/**
* Sends HTTP request, signed by {@link signatureMethod}.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array response.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array response.
*/
protected function sendSignedRequest($method, $url, array $params = [])
{
......@@ -163,10 +163,10 @@ class OAuth1 extends BaseOAuth
/**
* Composes HTTP request CUrl options, which will be merged with the default ones.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @throws Exception on failure.
*/
protected function composeRequestCurlOptions($method, $url, array $params)
......@@ -207,12 +207,12 @@ class OAuth1 extends BaseOAuth
/**
* Performs request to the OAuth API.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
*/
protected function apiInternal($accessToken, $url, $method, array $params)
{
......@@ -225,7 +225,7 @@ class OAuth1 extends BaseOAuth
/**
* Gets new auth token to replace expired one.
* @param OAuthToken $token expired auth token.
* @param OAuthToken $token expired auth token.
* @return OAuthToken new auth token.
*/
public function refreshAccessToken(OAuthToken $token)
......@@ -282,10 +282,10 @@ class OAuth1 extends BaseOAuth
/**
* Sign request with {@link signatureMethod}.
* @param string $method request method.
* @param string $url request URL.
* @param array $params request params.
* @return array signed request params.
* @param string $method request method.
* @param string $url request URL.
* @param array $params request params.
* @return array signed request params.
*/
protected function signRequest($method, $url, array $params)
{
......@@ -300,9 +300,9 @@ class OAuth1 extends BaseOAuth
/**
* Creates signature base string, which will be signed by {@link signatureMethod}.
* @param string $method request method.
* @param string $url request URL.
* @param array $params request params.
* @param string $method request method.
* @param string $url request URL.
* @param array $params request params.
* @return string base signature string.
*/
protected function composeSignatureBaseString($method, $url, array $params)
......@@ -341,8 +341,8 @@ class OAuth1 extends BaseOAuth
/**
* Composes authorization header content.
* @param array $params request params.
* @param string $realm authorization realm.
* @param array $params request params.
* @param string $realm authorization realm.
* @return string authorization header content.
*/
protected function composeAuthorizationHeader(array $params, $realm = '')
......
......@@ -52,7 +52,7 @@ class OAuth2 extends BaseOAuth
/**
* Composes user authorization URL.
* @param array $params additional auth GET params.
* @param array $params additional auth GET params.
* @return string authorization URL.
*/
public function buildAuthUrl(array $params = [])
......@@ -72,8 +72,8 @@ class OAuth2 extends BaseOAuth
/**
* Fetches access token from authorization code.
* @param string $authCode authorization code, usually comes at $_GET['code'].
* @param array $params additional request params.
* @param string $authCode authorization code, usually comes at $_GET['code'].
* @param array $params additional request params.
* @return OAuthToken access token.
*/
public function fetchAccessToken($authCode, array $params = [])
......@@ -94,10 +94,10 @@ class OAuth2 extends BaseOAuth
/**
* Composes HTTP request CUrl options, which will be merged with the default ones.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @param string $method request type.
* @param string $url request URL.
* @param array $params request params.
* @return array CUrl options.
* @throws Exception on failure.
*/
protected function composeRequestCurlOptions($method, $url, array $params)
......@@ -133,12 +133,12 @@ class OAuth2 extends BaseOAuth
/**
* Performs request to the OAuth API.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
* @param OAuthToken $accessToken actual access token.
* @param string $url absolute API URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array API response.
* @throws Exception on failure.
*/
protected function apiInternal($accessToken, $url, $method, array $params)
{
......@@ -149,7 +149,7 @@ class OAuth2 extends BaseOAuth
/**
* Gets new auth token to replace expired one.
* @param OAuthToken $token expired auth token.
* @param OAuthToken $token expired auth token.
* @return OAuthToken new auth token.
*/
public function refreshAccessToken(OAuthToken $token)
......@@ -180,7 +180,7 @@ class OAuth2 extends BaseOAuth
/**
* Creates token from its configuration.
* @param array $tokenConfig token configuration.
* @param array $tokenConfig token configuration.
* @return OAuthToken token instance.
*/
protected function createToken(array $tokenConfig = [])
......
......@@ -93,8 +93,8 @@ class OAuthToken extends Object
/**
* Sets param by name.
* @param string $name param name.
* @param mixed $value param value,
* @param string $name param name.
* @param mixed $value param value,
*/
public function setParam($name, $value)
{
......@@ -103,8 +103,8 @@ class OAuthToken extends Object
/**
* Returns param by name.
* @param string $name param name.
* @return mixed param value.
* @param string $name param name.
* @return mixed param value.
*/
public function getParam($name)
{
......@@ -113,7 +113,7 @@ class OAuthToken extends Object
/**
* Sets token value.
* @param string $token token value.
* @param string $token token value.
* @return static self reference.
*/
public function setToken($token)
......
......@@ -210,7 +210,7 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Checks if the server specified in the url exists.
* @param string $url URL to check
* @param string $url URL to check
* @return boolean true, if the server exists; false otherwise
*/
public function hostExists($url)
......@@ -230,10 +230,10 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Sends HTTP request.
* @param string $url request URL.
* @param string $method request method.
* @param array $params request params.
* @return array|string response.
* @param string $url request URL.
* @param string $method request method.
* @param array $params request params.
* @return array|string response.
* @throws \yii\base\Exception on failure.
*/
protected function sendCurlRequest($url, $method = 'GET', $params = [])
......@@ -287,11 +287,11 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Sends HTTP request.
* @param string $url request URL.
* @param string $method request method.
* @param array $params request params.
* @return array|string response.
* @throws \yii\base\Exception on failure.
* @param string $url request URL.
* @param string $method request method.
* @param array $params request params.
* @return array|string response.
* @throws \yii\base\Exception on failure.
* @throws \yii\base\NotSupportedException if request method is not supported.
*/
protected function sendStreamRequest($url, $method = 'GET', $params = [])
......@@ -377,9 +377,9 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Sends request to the server
* @param string $url request URL.
* @param string $method request method.
* @param array $params request parameters.
* @param string $url request URL.
* @param string $method request method.
* @param array $params request parameters.
* @return array|string response.
*/
protected function sendRequest($url, $method = 'GET', $params = [])
......@@ -393,9 +393,9 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Combines given URLs into single one.
* @param string $baseUrl base URL.
* @param string|array $additionalUrl additional URL string or information array.
* @return string composed URL.
* @param string $baseUrl base URL.
* @param string|array $additionalUrl additional URL string or information array.
* @return string composed URL.
*/
protected function buildUrl($baseUrl, $additionalUrl)
{
......@@ -424,11 +424,11 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Scans content for <meta>/<link> tags and extract information from them.
* @param string $content HTML content to be be parsed.
* @param string $tag name of the source tag.
* @param string $matchAttributeName name of the source tag attribute, which should contain $matchAttributeValue
* @param string $matchAttributeValue required value of $matchAttributeName
* @param string $valueAttributeName name of the source tag attribute, which should contain searched value.
* @param string $content HTML content to be be parsed.
* @param string $tag name of the source tag.
* @param string $matchAttributeName name of the source tag attribute, which should contain $matchAttributeValue
* @param string $matchAttributeValue required value of $matchAttributeName
* @param string $valueAttributeName name of the source tag attribute, which should contain searched value.
* @return string|boolean searched value, "false" on failure.
*/
protected function extractHtmlTagValue($content, $tag, $matchAttributeName, $matchAttributeValue, $valueAttributeName)
......@@ -442,14 +442,14 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Performs Yadis and HTML discovery.
* @param string $url Identity URL.
* @return array OpenID provider info, following keys will be available:
* - 'url' - string OP Endpoint (i.e. OpenID provider address).
* - 'version' - integer OpenID protocol version used by provider.
* - 'identity' - string identity value.
* - 'identifier_select' - boolean whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1.
* - 'ax' - boolean whether AX attributes should be used.
* - 'sreg' - boolean whether SREG attributes should be used.
* @param string $url Identity URL.
* @return array OpenID provider info, following keys will be available:
* - 'url' - string OP Endpoint (i.e. OpenID provider address).
* - 'version' - integer OpenID protocol version used by provider.
* - 'identity' - string identity value.
* - 'identifier_select' - boolean whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1.
* - 'ax' - boolean whether AX attributes should be used.
* - 'sreg' - boolean whether SREG attributes should be used.
* @throws Exception on failure.
*/
public function discover($url)
......@@ -694,7 +694,7 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Builds authentication URL for the protocol version 1.
* @param array $serverInfo OpenID server info.
* @param array $serverInfo OpenID server info.
* @return string authentication URL.
*/
protected function buildAuthUrlV1($serverInfo)
......@@ -722,7 +722,7 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Builds authentication URL for the protocol version 2.
* @param array $serverInfo OpenID server info.
* @param array $serverInfo OpenID server info.
* @return string authentication URL.
*/
protected function buildAuthUrlV2($serverInfo)
......@@ -758,8 +758,8 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Returns authentication URL. Usually, you want to redirect your user to it.
* @param boolean $identifierSelect whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1.
* @return string the authentication URL.
* @param boolean $identifierSelect whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1.
* @return string the authentication URL.
* @throws Exception on failure.
*/
public function buildAuthUrl($identifierSelect = null)
......@@ -783,7 +783,7 @@ class OpenId extends BaseClient implements ClientInterface
/**
* Performs OpenID verification with the OP.
* @param boolean $validateRequiredAttributes whether to validate required attributes.
* @param boolean $validateRequiredAttributes whether to validate required attributes.
* @return boolean whether the verification was successful.
*/
public function validate($validateRequiredAttributes = true)
......
......@@ -25,17 +25,17 @@ abstract class BaseMethod extends Object
/**
* Generates OAuth request signature.
* @param string $baseString signature base string.
* @param string $key signature key.
* @param string $baseString signature base string.
* @param string $key signature key.
* @return string signature string.
*/
abstract public function generateSignature($baseString, $key);
/**
* Verifies given OAuth request.
* @param string $signature signature to be verified.
* @param string $baseString signature base string.
* @param string $key signature key.
* @param string $signature signature to be verified.
* @param string $baseString signature base string.
* @param string $key signature key.
* @return boolean success.
*/
public function verify($signature, $baseString, $key)
......
......@@ -104,7 +104,7 @@ class RsaSha1 extends BaseMethod
* Creates initial value for {@link publicCertificate}.
* This method will attempt to fetch the certificate value from {@link publicCertificateFile} file.
* @throws InvalidConfigException on failure.
* @return string public certificate content.
* @return string public certificate content.
*/
protected function initPublicCertificate()
{
......@@ -123,7 +123,7 @@ class RsaSha1 extends BaseMethod
* Creates initial value for {@link privateCertificate}.
* This method will attempt to fetch the certificate value from {@link privateCertificateFile} file.
* @throws InvalidConfigException on failure.
* @return string private certificate content.
* @return string private certificate content.
*/
protected function initPrivateCertificate()
{
......
......@@ -166,9 +166,9 @@ class AuthChoice extends Widget
/**
* Outputs client auth link.
* @param ClientInterface $client external auth client instance.
* @param string $text link text, if not set - default value will be generated.
* @param array $htmlOptions link HTML options.
* @param ClientInterface $client external auth client instance.
* @param string $text link text, if not set - default value will be generated.
* @param array $htmlOptions link HTML options.
*/
public function clientLink($client, $text = null, array $htmlOptions = [])
{
......@@ -193,8 +193,8 @@ class AuthChoice extends Widget
/**
* Composes client auth URL.
* @param ClientInterface $provider external auth client instance.
* @return string auth URL.
* @param ClientInterface $provider external auth client instance.
* @return string auth URL.
*/
public function createClientUrl($provider)
{
......
......@@ -117,9 +117,9 @@ class Carousel extends Widget
/**
* Renders a single carousel item
* @param string|array $item a single item from [[items]]
* @param integer $index the item index as the first item should be set to `active`
* @return string the rendering result
* @param string|array $item a single item from [[items]]
* @param integer $index the item index as the first item should be set to `active`
* @return string the rendering result
* @throws InvalidConfigException if the item is invalid
*/
public function renderItem($item, $index)
......
......@@ -98,10 +98,10 @@ class Collapse extends Widget
/**
* Renders a single collapsible item group
* @param string $header a label of the item group [[items]]
* @param array $item a single item from [[items]]
* @param integer $index the item index as each item group content must have an id
* @return string the rendering result
* @param string $header a label of the item group [[items]]
* @param array $item a single item from [[items]]
* @param integer $index the item index as each item group content must have an id
* @return string the rendering result
* @throws InvalidConfigException
*/
public function renderItem($header, $item, $index)
......
......@@ -62,8 +62,8 @@ class Dropdown extends Widget
/**
* Renders menu items.
* @param array $items the menu items to be rendered
* @return string the rendering result.
* @param array $items the menu items to be rendered
* @return string the rendering result.
* @throws InvalidConfigException if the label option is not specified in one of the items.
*/
protected function renderItems($items)
......
......@@ -136,8 +136,8 @@ class Nav extends Widget
/**
* Renders a widget's item.
* @param string|array $item the item to render.
* @return string the rendering result.
* @param string|array $item the item to render.
* @return string the rendering result.
* @throws InvalidConfigException
*/
public function renderItem($item)
......@@ -211,7 +211,7 @@ class Nav extends Widget
* as the route for the item and the rest of the elements are the associated parameters.
* Only when its route and parameters match [[route]] and [[params]], respectively, will a menu item
* be considered active.
* @param array $item the menu item to be checked
* @param array $item the menu item to be checked
* @return boolean whether the menu item is active
*/
protected function isItemActive($item)
......
......@@ -62,7 +62,7 @@ class NavBar extends Widget
public $brandLabel;
/**
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]]
* and will be used for the "href" attribute of the brand link. If not set, [[\yii\web\Application::homeUrl]] will be used.
* and will be used for the "href" attribute of the brand link. If not set, [[\yii\web\Application::homeUrl]] will be used.
*/
public $brandUrl;
/**
......
......@@ -112,7 +112,7 @@ class Progress extends Widget
/**
* Renders the progress.
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException if the "percent" option is not set in a stacked progress bar.
*/
protected function renderProgress()
......@@ -135,10 +135,10 @@ class Progress extends Widget
/**
* Generates a bar
* @param integer $percent the percentage of the bar
* @param string $label, optional, the label to display at the bar
* @param array $options the HTML attributes of the bar
* @return string the rendering result.
* @param integer $percent the percentage of the bar
* @param string $label, optional, the label to display at the bar
* @param array $options the HTML attributes of the bar
* @return string the rendering result.
*/
protected function renderBar($percent, $label = '', $options = [])
{
......
......@@ -120,7 +120,7 @@ class Tabs extends Widget
/**
* Renders tab items as specified on [[items]].
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException.
*/
protected function renderItems()
......@@ -192,9 +192,9 @@ class Tabs extends Widget
/**
* Normalizes dropdown item options by removing tab specific keys `content` and `contentOptions`, and also
* configure `panes` accordingly.
* @param array $items the dropdown items configuration.
* @param array $panes the panes reference array.
* @return boolean whether any of the dropdown items is `active` or not.
* @param array $items the dropdown items configuration.
* @param array $panes the panes reference array.
* @return boolean whether any of the dropdown items is `active` or not.
* @throws InvalidConfigException
*/
protected function renderDropdown(&$items, &$panes)
......
......@@ -46,8 +46,8 @@ abstract class BasePage extends Component
* Returns the URL to this page.
* The URL will be returned by calling the URL manager of the application
* with [[route]] and the provided parameters.
* @param array $params the GET parameters for creating the URL
* @return string the URL to this page
* @param array $params the GET parameters for creating the URL
* @return string the URL to this page
* @throws InvalidConfigException if [[route]] is not set or invalid
*/
public function getUrl($params = [])
......@@ -65,9 +65,9 @@ abstract class BasePage extends Component
/**
* Creates a page instance and sets the test guy to use [[url]].
* @param \Codeception\AbstractGuy $I the test guy instance
* @param array $params the GET parameters to be used to generate [[url]]
* @return static the page instance
* @param \Codeception\AbstractGuy $I the test guy instance
* @param array $params the GET parameters to be used to generate [[url]]
* @return static the page instance
*/
public static function openBy($I, $params = [])
{
......
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\codeception;
......@@ -33,8 +38,8 @@ class TestCase extends Test
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when executing `$value = $object->property;`.
* @param string $name the property name
* @return mixed the property value
* @param string $name the property name
* @return mixed the property value
* @throws UnknownPropertyException if the property is not defined
*/
public function __get($name)
......@@ -52,10 +57,10 @@ class TestCase extends Test
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when an unknown method is being invoked.
* @param string $name the method name
* @param array $params method parameters
* @param string $name the method name
* @param array $params method parameters
* @throws UnknownMethodException when calling unknown method
* @return mixed the method return value
* @return mixed the method return value
*/
public function __call($name, $params)
{
......@@ -89,10 +94,10 @@ class TestCase extends Test
/**
* Mocks up the application instance.
* @param array $config the configuration that should be used to generate the application instance.
* If null, [[appConfig]] will be used.
* @param array $config the configuration that should be used to generate the application instance.
* If null, [[appConfig]] will be used.
* @return \yii\web\Application|\yii\console\Application the application instance
* @throws InvalidConfigException if the application configuration is invalid
* @throws InvalidConfigException if the application configuration is invalid
*/
protected function mockApplication($config = null)
{
......
......@@ -196,12 +196,12 @@ class Installer extends LibraryInstaller
file_put_contents($yiiDir . '/' . $file, <<<EOF
<?php
/**
* This is a link provided by the yiisoft/yii2-dev package via yii2-composer plugin.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
* This is a link provided by the yiisoft/yii2-dev package via yii2-composer plugin.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
return require(__DIR__ . '/../yii2-dev/framework/$file');
......
......@@ -27,7 +27,7 @@ class LogTarget extends Target
/**
* @param \yii\debug\Module $module
* @param array $config
* @param array $config
*/
public function __construct($module, $config = [])
{
......@@ -63,8 +63,8 @@ class LogTarget extends Target
/**
* Updates index file with summary log data
*
* @param string $indexFile path to index file
* @param array $summary summary log data
* @param string $indexFile path to index file
* @param array $summary summary log data
* @throws \yii\base\InvalidConfigException
*/
private function updateIndexFile($indexFile, $summary)
......@@ -100,9 +100,9 @@ class LogTarget extends Target
* Processes the given log messages.
* This method will filter the given messages with [[levels]] and [[categories]].
* And if requested, it will also export the filtering result to specific medium (e.g. email).
* @param array $messages log messages to be processed. See [[\yii\log\Logger::messages]] for the structure
* of each message.
* @param boolean $final whether this method is called at the end of the current application
* @param array $messages log messages to be processed. See [[\yii\log\Logger::messages]] for the structure
* of each message.
* @param boolean $final whether this method is called at the end of the current application
*/
public function collect($messages, $final)
{
......
......@@ -26,7 +26,7 @@ class Filter extends Component
/**
* Adds data filtering rule.
*
* @param string $name attribute name
* @param string $name attribute name
* @param MatcherInterface $rule
*/
public function addMatcher($name, MatcherInterface $rule)
......@@ -39,7 +39,7 @@ class Filter extends Component
/**
* Applies filter on a given array and returns filtered data.
*
* @param array $data data to filter
* @param array $data data to filter
* @return array filtered data
*/
public function filter(array $data)
......@@ -58,7 +58,7 @@ class Filter extends Component
/**
* Checks if the given data satisfies filters.
*
* @param array $row data
* @param array $row data
* @return boolean if data passed filtering
*/
private function passesFilter(array $row)
......
......@@ -18,7 +18,7 @@ interface MatcherInterface
/**
* Checks if the value passed matches base value.
*
* @param mixed $value value to be matched
* @param mixed $value value to be matched
* @return boolean if there is a match
*/
public function match($value);
......
......@@ -22,9 +22,9 @@ class Base extends Model
/**
* Adds filtering condition for a given attribute
*
* @param Filter $filter filter instance
* @param string $attribute attribute to filter
* @param boolean $partial if partial match should be used
* @param Filter $filter filter instance
* @param string $attribute attribute to filter
* @param boolean $partial if partial match should be used
*/
public function addCondition(Filter $filter, $attribute, $partial = false)
{
......
......@@ -53,8 +53,8 @@ class Db extends Base
/**
* Returns data provider with filled models. Filter applied if needed.
*
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @return \yii\data\ArrayDataProvider
*/
public function search($params, $models)
......
......@@ -93,8 +93,8 @@ class Debug extends Base
/**
* Returns data provider with filled models. Filter applied if needed.
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @return \yii\data\ArrayDataProvider
*/
public function search($params, $models)
......@@ -130,7 +130,7 @@ class Debug extends Base
/**
* Checks if code is critical.
*
* @param integer $code
* @param integer $code
* @return boolean
*/
public function isCodeCritical($code)
......
......@@ -59,8 +59,8 @@ class Log extends Base
/**
* Returns data provider with filled models. Filter applied if needed.
*
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @return \yii\data\ArrayDataProvider
*/
public function search($params, $models)
......
......@@ -93,8 +93,8 @@ class Mail extends Base
/**
* Returns data provider with filled models. Filter applied if needed.
* @param array $params
* @param array $models
* @param array $params
* @param array $models
* @return \yii\data\ArrayDataProvider
*/
public function search($params, $models)
......
......@@ -53,8 +53,8 @@ class Profile extends Base
/**
* Returns data provider with filled models. Filter applied if needed.
*
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @param array $params an array of parameter values indexed by parameter names
* @param array $models data to return provider for
* @return \yii\data\ArrayDataProvider
*/
public function search($params, $models)
......
......@@ -115,7 +115,7 @@ class DbPanel extends Panel
/**
* Returns total query time.
*
* @param array $timings
* @param array $timings
* @return integer total time
*/
protected function getTotalQueryTime($timings)
......@@ -158,7 +158,7 @@ class DbPanel extends Panel
/**
* Returns databse query type.
*
* @param string $timing timing procedure string
* @param string $timing timing procedure string
* @return string query type such as select, insert, delete, etc.
*/
protected function getQueryType($timing)
......@@ -172,7 +172,7 @@ class DbPanel extends Panel
/**
* Check if given queries count is critical according settings.
*
* @param integer $count queries count
* @param integer $count queries count
* @return boolean
*/
public function isQueryCountCritical($count)
......
......@@ -71,8 +71,8 @@ class LogPanel extends Panel
* Returns an array of models that represents logs of the current request.
* Can be used with data providers, such as \yii\data\ArrayDataProvider.
*
* @param boolean $refresh if need to build models from log messages and refresh them.
* @return array models
* @param boolean $refresh if need to build models from log messages and refresh them.
* @return array models
*/
protected function getModels($refresh = false)
{
......
......@@ -91,9 +91,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Creates a DB command that can be used to execute this query.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return Command the created DB command instance.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return Command the created DB command instance.
*/
public function createCommand($db = null)
{
......@@ -137,9 +137,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns all results as an array.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null)
{
......@@ -191,11 +191,11 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns a single row of result.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]],
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
*/
public function one($db = null)
{
......
......@@ -100,11 +100,11 @@ class ActiveRecord extends BaseActiveRecord
/**
* Gets a record by its primary key.
*
* @param mixed $primaryKey the primaryKey value
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters.
* Please refer to the [elasticsearch documentation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html)
* for more details on these options.
* @param mixed $primaryKey the primaryKey value
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters.
* Please refer to the [elasticsearch documentation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html)
* for more details on these options.
* @return static|null The record instance or null if it was not found.
*/
public static function get($primaryKey, $options = [])
......@@ -129,8 +129,8 @@ class ActiveRecord extends BaseActiveRecord
* Gets a list of records by its primary keys.
*
* @param array $primaryKeys an array of primaryKey values
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters.
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters.
*
* Please refer to the [elasticsearch documentation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html)
* for more details on these options.
......@@ -177,7 +177,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Sets the primary key
* @param mixed $value
* @param mixed $value
* @throws \yii\base\InvalidCallException when record is not new
*/
public function setPrimaryKey($value)
......@@ -301,11 +301,11 @@ class ActiveRecord extends BaseActiveRecord
* depends on the row data to be populated into the record.
* For example, by creating a record based on the value of a column,
* you may implement the so-called single-table inheritance mapping.
* @param array $row row data to be populated into the record.
* This array consists of the following keys:
* - `_source`: refers to the attributes of the record.
* - `_type`: the type this record is stored in.
* - `_index`: the index this record is stored in.
* @param array $row row data to be populated into the record.
* This array consists of the following keys:
* - `_source`: refers to the attributes of the record.
* - `_type`: the type this record is stored in.
* - `_index`: the index this record is stored in.
* @return static the newly created active record
*/
public static function instantiate($row)
......@@ -347,11 +347,11 @@ class ActiveRecord extends BaseActiveRecord
* ~~~
*
* @param boolean $runValidation whether to perform validation before saving the record.
* If the validation fails, the record will not be inserted into the database.
* @param array $attributes list of attributes that need to be saved. Defaults to null,
* meaning all attributes will be saved.
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters. These are among others:
* If the validation fails, the record will not be inserted into the database.
* @param array $attributes list of attributes that need to be saved. Defaults to null,
* meaning all attributes will be saved.
* @param array $options options given in this parameter are passed to elasticsearch
* as request URI parameters. These are among others:
*
* - `routing` define shard placement of this record.
* - `parent` by giving the primaryKey of another record this defines a parent-child relation
......@@ -407,9 +407,9 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAll(['status' => 1], [2, 3, 4]);
* ~~~
*
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @return integer the number of rows updated
*/
public static function updateAll($attributes, $condition = [])
......@@ -465,11 +465,11 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAllCounters(['age' => 1]);
* ~~~
*
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @return integer the number of rows updated
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @return integer the number of rows updated
*/
public static function updateAllCounters($counters, $condition = [])
{
......@@ -531,8 +531,8 @@ class ActiveRecord extends BaseActiveRecord
* Customer::deleteAll('status = 3');
* ~~~
*
* @param array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @param array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @return integer the number of rows deleted
*/
public static function deleteAll($condition = [])
......
......@@ -42,7 +42,7 @@ class Command extends Component
public $options = [];
/**
* @param array $options
* @param array $options
* @return mixed
*/
public function search($options = [])
......@@ -65,11 +65,11 @@ class Command extends Component
/**
* Inserts a document into an index
* @param string $index
* @param string $type
* @param string|array $data json string or array of data to store
* @param null $id the documents id. If not specified Id will be automatically chosen
* @param array $options
* @param string $index
* @param string $type
* @param string|array $data json string or array of data to store
* @param null $id the documents id. If not specified Id will be automatically chosen
* @param array $options
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html
*/
......@@ -89,7 +89,7 @@ class Command extends Component
* @param $index
* @param $type
* @param $id
* @param array $options
* @param array $options
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html
*/
......@@ -105,7 +105,7 @@ class Command extends Component
* @param $index
* @param $type
* @param $ids
* @param array $options
* @param array $options
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-multi-get.html
*/
......@@ -147,7 +147,7 @@ class Command extends Component
* @param $index
* @param $type
* @param $id
* @param array $options
* @param array $options
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete.html
*/
......@@ -161,7 +161,7 @@ class Command extends Component
* @param $index
* @param $type
* @param $id
* @param array $options
* @param array $options
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html
*/
......@@ -176,7 +176,7 @@ class Command extends Component
/**
* creates an index
* @param $index
* @param array $configuration
* @param array $configuration
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html
*/
......@@ -319,8 +319,8 @@ class Command extends Component
}
/**
* @param string $index
* @param string $type
* @param string $index
* @param string $type
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html
*/
......@@ -342,7 +342,7 @@ class Command extends Component
/**
* @param $index
* @param string $type
* @param string $type
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html
*/
......@@ -368,7 +368,7 @@ class Command extends Component
* @param $pattern
* @param $settings
* @param $mappings
* @param integer $order
* @param integer $order
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html
*/
......
......@@ -161,7 +161,7 @@ class Connection extends Component
/**
* Creates a command for execution.
* @param array $config the configuration for the Command class
* @param array $config the configuration for the Command class
* @return Command the DB command
*/
public function createCommand($config = [])
......
......@@ -27,7 +27,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Constructor.
* @param Connection $connection the database connection.
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($connection, $config = [])
{
......@@ -37,9 +37,9 @@ class QueryBuilder extends \yii\base\Object
/**
* Generates query from a [[Query]] object.
* @param Query $query the [[Query]] object from which the query will be generated
* @param Query $query the [[Query]] object from which the query will be generated
* @return array the generated SQL statement (the first array element) and the corresponding
* parameters to be bound to the SQL statement (the second array element).
* parameters to be bound to the SQL statement (the second array element).
*/
public function build($query)
{
......@@ -134,7 +134,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Parses the condition specification and generates the corresponding SQL expression.
*
* @param string|array $condition the condition specification. Please refer to [[Query::where()]] on how to specify a condition.
* @param string|array $condition the condition specification. Please refer to [[Query::where()]] on how to specify a condition.
* @throws \yii\base\InvalidParamException if unknown operator is used in query
* @throws \yii\base\NotSupportedException if string conditions are used in where
* @return string the generated SQL expression
......
......@@ -283,7 +283,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
/**
* Checks if needed to generate all fixtures.
* @param string $file
* @param string $file
* @return bool
*/
public function needToGenerateAll($file)
......@@ -293,8 +293,8 @@ class FixtureController extends \yii\console\controllers\FixtureController
/**
* Returns generator template for the given fixture name
* @param string $file template file
* @return array generator template
* @param string $file template file
* @return array generator template
* @throws \yii\console\Exception if wrong file format
*/
public function getTemplate($file)
......@@ -310,7 +310,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
/**
* Returns exported to the string representation of given fixtures array.
* @param array $fixtures
* @param array $fixtures
* @return string exported fixtures format
*/
public function exportFixtures($fixtures)
......@@ -335,9 +335,9 @@ class FixtureController extends \yii\console\controllers\FixtureController
/**
* Generates fixture from given template
* @param array $template fixture template
* @param integer $index current fixture index
* @return array fixture
* @param array $template fixture template
* @param integer $index current fixture index
* @return array fixture
*/
public function generateFixture($template, $index)
{
......@@ -356,7 +356,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
/**
* Prompts user with message if he confirm generation with given fixture templates files.
* @param array $files
* @param array $files
* @return boolean
*/
public function confirmGeneration($files)
......
......@@ -56,7 +56,7 @@ class CodeFile extends Object
/**
* Constructor.
* @param string $path the file path that the new code should be saved to.
* @param string $path the file path that the new code should be saved to.
* @param string $content the newly generated code content.
*/
public function __construct($path, $content)
......@@ -166,8 +166,8 @@ class CodeFile extends Object
/**
* Renders diff between two sets of lines
*
* @param mixed $lines1
* @param mixed $lines2
* @param mixed $lines1
* @param mixed $lines2
* @return string
*/
private function renderDiff($lines1, $lines2)
......
......@@ -100,7 +100,7 @@ abstract class Generator extends Model
* Derived classes usually should override this method if they require the existence of
* certain template files.
* @return array list of code template files that are required. They should be file paths
* relative to [[templatePath]].
* relative to [[templatePath]].
*/
public function requiredTemplates()
{
......@@ -256,11 +256,11 @@ abstract class Generator extends Model
/**
* Saves the generated code into files.
* @param CodeFile[] $files the code files to be saved
* @param array $answers
* @param string $results this parameter receives a value from this method indicating the log messages
* generated while saving the code files.
* @return boolean whether there is any error while saving the code files.
* @param CodeFile[] $files the code files to be saved
* @param array $answers
* @param string $results this parameter receives a value from this method indicating the log messages
* generated while saving the code files.
* @return boolean whether there is any error while saving the code files.
*/
public function save($files, $answers, &$results)
{
......@@ -287,7 +287,7 @@ abstract class Generator extends Model
}
/**
* @return string the root path of the template files that are currently being used.
* @return string the root path of the template files that are currently being used.
* @throws InvalidConfigException if [[template]] is invalid
*/
public function getTemplatePath()
......@@ -302,9 +302,9 @@ abstract class Generator extends Model
/**
* Generates code using the specified code template and parameters.
* Note that the code template will be used as a PHP file.
* @param string $template the code template file. This must be specified as a file path
* relative to [[templatePath]].
* @param array $params list of parameters to be passed to the template file.
* @param string $template the code template file. This must be specified as a file path
* relative to [[templatePath]].
* @param array $params list of parameters to be passed to the template file.
* @return string the generated code
*/
public function render($template, $params = [])
......@@ -340,7 +340,7 @@ abstract class Generator extends Model
* If the `extends` option is specified, it will also check if the class is a child class
* of the class represented by the `extends` option.
* @param string $attribute the attribute being validated
* @param array $params the validation options
* @param array $params the validation options
*/
public function validateClass($attribute, $params)
{
......@@ -364,7 +364,7 @@ abstract class Generator extends Model
* An inline validator that checks if the attribute value refers to a valid namespaced class name.
* The validator will check if the directory containing the new class file exist or not.
* @param string $attribute the attribute being validated
* @param array $params the validation options
* @param array $params the validation options
*/
public function validateNewClass($attribute, $params)
{
......@@ -393,7 +393,7 @@ abstract class Generator extends Model
}
/**
* @param string $value the attribute to be validated
* @param string $value the attribute to be validated
* @return boolean whether the value is a reserved PHP keyword.
*/
public function isReservedKeyword($value)
......
......@@ -57,7 +57,7 @@ class ActiveField extends \yii\widgets\ActiveField
/**
* Makes field auto completable
* @param array $data auto complete data (array of callables or scalars)
* @param array $data auto complete data (array of callables or scalars)
* @return static the field object itself
*/
public function autoComplete($data)
......
......@@ -92,9 +92,9 @@ class DefaultController extends Controller
* Runs an action defined in the generator.
* Given an action named "xyz", the method "actionXyz()" in the generator will be called.
* If the method does not exist, a 400 HTTP exception will be thrown.
* @param string $id the ID of the generator
* @param string $name the action name
* @return mixed the result of the action.
* @param string $id the ID of the generator
* @param string $name the action name
* @return mixed the result of the action.
* @throws NotFoundHttpException if the action method does not exist.
*/
public function actionAction($id, $name)
......@@ -110,8 +110,8 @@ class DefaultController extends Controller
/**
* Loads the generator with the specified ID.
* @param string $id the ID of the generator to be loaded.
* @return \yii\gii\Generator the loaded generator
* @param string $id the ID of the generator to be loaded.
* @return \yii\gii\Generator the loaded generator
* @throws NotFoundHttpException
*/
protected function loadGenerator($id)
......
......@@ -238,7 +238,7 @@ class Generator extends \yii\gii\Generator
}
/**
* @param string $action the action ID
* @param string $action the action ID
* @return string the action view file path
*/
public function getViewFile($action)
......
......@@ -214,7 +214,7 @@ class Generator extends \yii\gii\Generator
/**
* Generates code for active field
* @param string $attribute
* @param string $attribute
* @return string
*/
public function generateActiveField($attribute)
......@@ -248,7 +248,7 @@ class Generator extends \yii\gii\Generator
/**
* Generates code for active search field
* @param string $attribute
* @param string $attribute
* @return string
*/
public function generateActiveSearchField($attribute)
......@@ -267,7 +267,7 @@ class Generator extends \yii\gii\Generator
/**
* Generates column format
* @param \yii\db\ColumnSchema $column
* @param \yii\db\ColumnSchema $column
* @return string
*/
public function generateColumnFormat($column)
......
......@@ -175,8 +175,8 @@ class Generator extends \yii\gii\Generator
/**
* Generates the attribute labels for the specified table.
* @param \yii\db\TableSchema $table the table schema
* @return array the generated attribute labels (name => label)
* @param \yii\db\TableSchema $table the table schema
* @return array the generated attribute labels (name => label)
*/
public function generateLabels($table)
{
......@@ -200,8 +200,8 @@ class Generator extends \yii\gii\Generator
/**
* Generates validation rules for the specified table.
* @param \yii\db\TableSchema $table the table schema
* @return array the generated validation rules
* @param \yii\db\TableSchema $table the table schema
* @return array the generated validation rules
*/
public function generateRules($table)
{
......@@ -361,7 +361,7 @@ class Generator extends \yii\gii\Generator
/**
* Generates the link parameter to be used in generating the relation declaration.
* @param array $refs reference constraint
* @param array $refs reference constraint
* @return string the generated link parameter.
*/
protected function generateRelationLink($refs)
......@@ -380,7 +380,7 @@ class Generator extends \yii\gii\Generator
* each referencing a column in a different table.
* @param \yii\db\TableSchema the table being checked
* @return array|boolean the relevant foreign key constraint information if the table is a pivot table,
* or false if the table is not a pivot table.
* or false if the table is not a pivot table.
*/
protected function checkPivotTable($table)
{
......@@ -407,12 +407,12 @@ class Generator extends \yii\gii\Generator
/**
* Generate a relation name for the specified table and a base name.
* @param array $relations the relations being generated currently.
* @param string $className the class name that will contain the relation declarations
* @param \yii\db\TableSchema $table the table schema
* @param string $key a base name that the relation name may be generated from
* @param boolean $multiple whether this is a has-many relation
* @return string the relation name
* @param array $relations the relations being generated currently.
* @param string $className the class name that will contain the relation declarations
* @param \yii\db\TableSchema $table the table schema
* @param string $key a base name that the relation name may be generated from
* @param boolean $multiple whether this is a has-many relation
* @return string the relation name
*/
protected function generateRelationName($relations, $className, $table, $key, $multiple)
{
......@@ -535,7 +535,7 @@ class Generator extends \yii\gii\Generator
/**
* Generates a class name from the specified table name.
* @param string $tableName the table name (which may contain schema prefix)
* @param string $tableName the table name (which may contain schema prefix)
* @return string the generated class name
*/
protected function generateClassName($tableName)
......@@ -580,9 +580,9 @@ class Generator extends \yii\gii\Generator
/**
* Checks if any of the specified columns is auto incremental.
* @param \yii\db\TableSchema $table the table schema
* @param array $columns columns to check for autoIncrement property
* @return boolean whether any of the specified columns is auto incremental.
* @param \yii\db\TableSchema $table the table schema
* @param array $columns columns to check for autoIncrement property
* @return boolean whether any of the specified columns is auto incremental.
*/
protected function isColumnAutoIncremental($table, $columns)
{
......
......@@ -75,7 +75,7 @@ class BaseImage
/**
* Creates an `Imagine` object based on the specified [[driver]].
* @return ImagineInterface the new `Imagine` object
* @return ImagineInterface the new `Imagine` object
* @throws InvalidConfigException if [[driver]] is unknown or the system doesn't support any [[driver]].
*/
protected static function createImagine()
......@@ -116,10 +116,10 @@ class BaseImage
* $obj->crop('path\to\image.jpg', 200, 200, $point);
* ~~~
*
* @param string $filename the image file path or path alias.
* @param integer $width the crop width
* @param integer $height the crop height
* @param array $start the starting point. This must be an array with two elements representing `x` and `y` coordinates.
* @param string $filename the image file path or path alias.
* @param integer $width the crop width
* @param integer $height the crop height
* @param array $start the starting point. This must be an array with two elements representing `x` and `y` coordinates.
* @return ImageInterface
* @throws InvalidParamException if the `$start` parameter is invalid
*/
......@@ -138,10 +138,10 @@ class BaseImage
/**
* Creates a thumbnail image. The function differs from `\Imagine\Image\ImageInterface::thumbnail()` function that
* it keeps the aspect ratio of the image.
* @param string $filename the image file path or path alias.
* @param integer $width the width in pixels to create the thumbnail
* @param integer $height the height in pixels to create the thumbnail
* @param string $mode
* @param string $filename the image file path or path alias.
* @param integer $width the width in pixels to create the thumbnail
* @param integer $height the height in pixels to create the thumbnail
* @param string $mode
* @return ImageInterface
*/
public static function thumbnail($filename, $width, $height, $mode = ManipulatorInterface::THUMBNAIL_OUTBOUND)
......@@ -177,9 +177,9 @@ class BaseImage
/**
* Adds a watermark to an existing image.
* @param string $filename the image file path or path alias.
* @param string $watermarkFilename the file path or path alias of the watermark image.
* @param array $start the starting point. This must be an array with two elements representing `x` and `y` coordinates.
* @param string $filename the image file path or path alias.
* @param string $watermarkFilename the file path or path alias of the watermark image.
* @param array $start the starting point. This must be an array with two elements representing `x` and `y` coordinates.
* @return ImageInterface
* @throws InvalidParamException if `$start` is invalid
*/
......@@ -198,11 +198,11 @@ class BaseImage
/**
* Draws a text string on an existing image.
* @param string $filename the image file path or path alias.
* @param string $text the text to write to the image
* @param string $fontFile the file path or path alias
* @param array $start the starting position of the text. This must be an array with two elements representing `x` and `y` coordinates.
* @param array $fontOptions the font options. The following options may be specified:
* @param string $filename the image file path or path alias.
* @param string $text the text to write to the image
* @param string $fontFile the file path or path alias
* @param array $start the starting position of the text. This must be an array with two elements representing `x` and `y` coordinates.
* @param array $fontOptions the font options. The following options may be specified:
*
* - color: The font color. Defaults to "fff".
* - size: The font size. Defaults to 12.
......@@ -231,10 +231,10 @@ class BaseImage
/**
* Adds a frame around of the image. Please note that the image size will increase by `$margin` x 2.
* @param string $filename the full path to the image file
* @param integer $margin the frame size to add around the image
* @param string $color the frame color
* @param integer $alpha the alpha value of the frame.
* @param string $filename the full path to the image file
* @param integer $margin the frame size to add around the image
* @param string $color the frame color
* @param integer $alpha the alpha value of the frame.
* @return ImageInterface
*/
public static function frame($filename, $margin = 20, $color = '666', $alpha = 100)
......
......@@ -100,7 +100,7 @@ class Accordion extends Widget
/**
* Renders collapsible items as specified on [[items]].
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException.
*/
protected function renderItems()
......
......@@ -33,7 +33,7 @@ use yii\helpers\Html;
* 'source' => ['USA', 'RUS'],
* ],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/autocomplete/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -37,7 +37,7 @@ use yii\helpers\Json;
* 'dateFormat' => 'yy-mm-dd',
* ],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/datepicker/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -28,7 +28,7 @@ use yii\helpers\Html;
* ~~~php
* ProgressBar::begin([
* 'clientOptions' => ['value' => 75],
* ]);
* ]);
*
* echo '<div class="progress-label">Loading...</div>';
*
......
......@@ -94,7 +94,7 @@ class Selectable extends Widget
/**
* Renders selectable items as specified on [[items]].
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException.
*/
public function renderItems()
......
......@@ -103,7 +103,7 @@ class Sortable extends Widget
/**
* Renders sortable items as specified on [[items]].
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException.
*/
public function renderItems()
......
......@@ -29,7 +29,7 @@ use yii\helpers\Html;
* 'name' => 'country',
* 'clientOptions' => ['step' => 2],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/spinner/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -69,7 +69,7 @@ class Tabs extends Widget
* - content: string, the content to show when corresponding tab is clicked. Can be omitted if url is specified.
* - url: mixed, mixed, optional, the url to load tab contents via AJAX. It is required if no content is specified.
* - template: string, optional, the header link template to render the header link. If none specified
* [[linkTemplate]] will be used instead.
* [[linkTemplate]] will be used instead.
* - options: array, optional, the HTML attributes of the header.
* - headerOptions: array, optional, the HTML attributes for the header container tag.
*/
......@@ -113,7 +113,7 @@ class Tabs extends Widget
/**
* Renders tab items as specified on [[items]].
* @return string the rendering result.
* @return string the rendering result.
* @throws InvalidConfigException.
*/
protected function renderItems()
......
......@@ -86,7 +86,7 @@ class Widget extends \yii\base\Widget
/**
* Registers a specific jQuery UI widget options
* @param string $name the name of the jQuery UI widget
* @param string $id the ID of the widget
* @param string $id the ID of the widget
*/
protected function registerClientOptions($name, $id)
{
......@@ -100,7 +100,7 @@ class Widget extends \yii\base\Widget
/**
* Registers a specific jQuery UI widget events
* @param string $name the name of the jQuery UI widget
* @param string $id the ID of the widget
* @param string $id the ID of the widget
*/
protected function registerClientEvents($name, $id)
{
......@@ -120,9 +120,9 @@ class Widget extends \yii\base\Widget
/**
* Registers a specific jQuery UI widget asset bundle, initializes it with client options and registers related events
* @param string $name the name of the jQuery UI widget
* @param string $name the name of the jQuery UI widget
* @param string $assetBundle the asset bundle for the widget
* @param string $id the ID of the widget. If null, it will use the `id` value of [[options]].
* @param string $id the ID of the widget. If null, it will use the `id` value of [[options]].
*/
protected function registerWidget($name, $assetBundle, $id = null)
{
......
......@@ -110,9 +110,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns all results as an array.
* @param Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
* @param Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null)
{
......@@ -137,11 +137,11 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns a single row of result.
* @param Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @param Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]],
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
*/
public function one($db = null)
{
......@@ -172,7 +172,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Returns the Mongo collection for this query.
* @param Connection $db Mongo connection.
* @param Connection $db Mongo connection.
* @return Collection collection instance.
*/
public function getCollection($db = null)
......
......@@ -40,10 +40,10 @@ abstract class ActiveRecord extends BaseActiveRecord
* Customer::updateAll(['status' => 1], ['status' => 2]);
* ~~~
*
* @param array $attributes attribute values (name-value pairs) to be saved into the collection
* @param array $condition description of the objects to update.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @param array $attributes attribute values (name-value pairs) to be saved into the collection
* @param array $condition description of the objects to update.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @return integer the number of documents updated.
*/
public static function updateAll($attributes, $condition = [], $options = [])
......@@ -59,11 +59,11 @@ abstract class ActiveRecord extends BaseActiveRecord
* Customer::updateAllCounters(['age' => 1]);
* ~~~
*
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param array $condition description of the objects to update.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param array $condition description of the objects to update.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @return integer the number of documents updated.
*/
public static function updateAllCounters($counters, $condition = [], $options = [])
......@@ -81,9 +81,9 @@ abstract class ActiveRecord extends BaseActiveRecord
* Customer::deleteAll(['status' => 3]);
* ~~~
*
* @param array $condition description of the objects to delete.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @param array $condition description of the objects to delete.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $options list of options in format: optionName => optionValue.
* @return integer the number of documents deleted.
*/
public static function deleteAll($condition = [], $options = [])
......@@ -101,10 +101,12 @@ abstract class ActiveRecord extends BaseActiveRecord
/**
* Declares the name of the Mongo collection associated with this AR class.
*
* Collection name can be either a string or array:
* - if string considered as the name of the collection inside the default database.
* - if array - first element considered as the name of the database, second - as
* name of collection inside that database
* name of collection inside that database
*
* By default this method returns the class name as the collection name by calling [[Inflector::camel2id()]].
* For example, 'Customer' becomes 'customer', and 'OrderItem' becomes
* 'order_item'. You may override this method if the table is not named after this convention.
......@@ -186,11 +188,11 @@ abstract class ActiveRecord extends BaseActiveRecord
* $customer->insert();
* ~~~
*
* @param boolean $runValidation whether to perform validation before saving the record.
* If the validation fails, the record will not be inserted into the collection.
* @param array $attributes list of attributes that need to be saved. Defaults to null,
* meaning all attributes that are loaded will be saved.
* @return boolean whether the attributes are valid and the record is inserted successfully.
* @param boolean $runValidation whether to perform validation before saving the record.
* If the validation fails, the record will not be inserted into the collection.
* @param array $attributes list of attributes that need to be saved. Defaults to null,
* meaning all attributes that are loaded will be saved.
* @return boolean whether the attributes are valid and the record is inserted successfully.
* @throws \Exception in case insert failed.
*/
public function insert($runValidation = true, $attributes = null)
......@@ -279,11 +281,11 @@ abstract class ActiveRecord extends BaseActiveRecord
* In the above step 1 and 3, events named [[EVENT_BEFORE_DELETE]] and [[EVENT_AFTER_DELETE]]
* will be raised by the corresponding methods.
*
* @return integer|boolean the number of documents deleted, or false if the deletion is unsuccessful for some reason.
* Note that it is possible the number of documents deleted is 0, even though the deletion execution is successful.
* @return integer|boolean the number of documents deleted, or false if the deletion is unsuccessful for some reason.
* Note that it is possible the number of documents deleted is 0, even though the deletion execution is successful.
* @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
* being deleted is outdated.
* @throws \Exception in case delete failed.
* being deleted is outdated.
* @throws \Exception in case delete failed.
*/
public function delete()
{
......@@ -322,8 +324,8 @@ abstract class ActiveRecord extends BaseActiveRecord
* Returns a value indicating whether the given active record is the same as the current one.
* The comparison is made by comparing the table names and the primary key values of the two active records.
* If one of the records [[isNewRecord|is new]] they are also considered not equal.
* @param ActiveRecord $record record to compare to
* @return boolean whether the two active records refer to the same row in the same Mongo collection.
* @param ActiveRecord $record record to compare to
* @return boolean whether the two active records refer to the same row in the same Mongo collection.
*/
public function equals($record)
{
......
......@@ -69,7 +69,7 @@ class Cache extends \yii\caching\Cache
* Retrieves a value from cache with a specified key.
* This method should be implemented by child classes to retrieve the data
* from specific cache storage.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -100,9 +100,9 @@ class Cache extends \yii\caching\Cache
* Stores a value identified by a key in cache.
* This method should be implemented by child classes to store the data
* in specific cache storage.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $expire the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $expire the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $expire)
......@@ -126,9 +126,9 @@ class Cache extends \yii\caching\Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This method should be implemented by child classes to store the data
* in specific cache storage.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $expire the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $expire the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $expire)
......@@ -158,7 +158,7 @@ class Cache extends \yii\caching\Cache
/**
* Deletes a value with the specified key from cache
* This method should be implemented by child classes to delete the data from actual cache storage.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......@@ -185,7 +185,7 @@ class Cache extends \yii\caching\Cache
/**
* Removes the expired data values.
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
*/
public function gc($force = false)
{
......
......@@ -54,12 +54,12 @@ use Yii;
*
* ~~~
* [
* 'components' => [
* 'mongodb' => [
* 'class' => '\yii\mongodb\Connection',
* 'dsn' => 'mongodb://developer:password@localhost:27017/mydatabase',
* ],
* ],
* 'components' => [
* 'mongodb' => [
* 'class' => '\yii\mongodb\Connection',
* 'dsn' => 'mongodb://developer:password@localhost:27017/mydatabase',
* ],
* ],
* ]
* ~~~
*
......@@ -119,9 +119,9 @@ class Connection extends Component
/**
* Returns the Mongo collection with the given name.
* @param string|null $name collection name, if null default one will be used.
* @param boolean $refresh whether to reestablish the database connection even if it is found in the cache.
* @return Database database instance.
* @param string|null $name collection name, if null default one will be used.
* @param boolean $refresh whether to reestablish the database connection even if it is found in the cache.
* @return Database database instance.
*/
public function getDatabase($name = null, $refresh = false)
{
......@@ -138,7 +138,7 @@ class Connection extends Component
/**
* Returns [[defaultDatabaseName]] value, if it is not set,
* attempts to determine it from [[dsn]] value.
* @return string default database name
* @return string default database name
* @throws \yii\base\InvalidConfigException if unable to determine default database name.
*/
protected function fetchDefaultDatabaseName()
......@@ -158,7 +158,7 @@ class Connection extends Component
/**
* Selects the database with given name.
* @param string $name database name.
* @param string $name database name.
* @return Database database instance.
*/
protected function selectDatabase($name)
......@@ -173,11 +173,11 @@ class Connection extends Component
/**
* Returns the Mongo collection with the given name.
* @param string|array $name collection name. If string considered as the name of the collection
* inside the default database. If array - first element considered as the name of the database,
* second - as name of collection inside that database
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return Collection Mongo collection instance.
* @param string|array $name collection name. If string considered as the name of the collection
* inside the default database. If array - first element considered as the name of the database,
* second - as name of collection inside that database
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return Collection Mongo collection instance.
*/
public function getCollection($name, $refresh = false)
{
......@@ -192,11 +192,11 @@ class Connection extends Component
/**
* Returns the Mongo GridFS collection.
* @param string|array $prefix collection prefix. If string considered as the prefix of the GridFS
* collection inside the default database. If array - first element considered as the name of the database,
* second - as prefix of the GridFS collection inside that database, if no second element present
* default "fs" prefix will be used.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @param string|array $prefix collection prefix. If string considered as the prefix of the GridFS
* collection inside the default database. If array - first element considered as the name of the database,
* second - as prefix of the GridFS collection inside that database, if no second element present
* default "fs" prefix will be used.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return file\Collection Mongo GridFS collection instance.
*/
public function getFileCollection($prefix = 'fs', $refresh = false)
......
......@@ -45,8 +45,8 @@ class Database extends Object
/**
* Returns the Mongo collection with the given name.
* @param string $name collection name
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @param string $name collection name
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return Collection Mongo collection instance.
*/
public function getCollection($name, $refresh = false)
......@@ -60,8 +60,8 @@ class Database extends Object
/**
* Returns Mongo GridFS collection with given prefix.
* @param string $prefix collection prefix.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @param string $prefix collection prefix.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return file\Collection Mongo GridFS collection.
*/
public function getFileCollection($prefix = 'fs', $refresh = false)
......@@ -75,7 +75,7 @@ class Database extends Object
/**
* Selects collection with given name.
* @param string $name collection name.
* @param string $name collection name.
* @return Collection collection instance.
*/
protected function selectCollection($name)
......@@ -88,7 +88,7 @@ class Database extends Object
/**
* Selects GridFS collection with given prefix.
* @param string $prefix file collection prefix.
* @param string $prefix file collection prefix.
* @return file\Collection file collection instance.
*/
protected function selectFileCollection($prefix)
......@@ -104,10 +104,10 @@ class Database extends Object
* Note: Mongo creates new collections automatically on the first demand,
* this method makes sense only for the migration script or for the case
* you need to create collection with the specific options.
* @param string $name name of the collection
* @param array $options collection options in format: "name" => "value"
* @param string $name name of the collection
* @param array $options collection options in format: "name" => "value"
* @return \MongoCollection new Mongo collection instance.
* @throws Exception on failure.
* @throws Exception on failure.
*/
public function createCollection($name, $options = [])
{
......@@ -127,9 +127,9 @@ class Database extends Object
/**
* Executes Mongo command.
* @param array $command command specification.
* @param array $options options in format: "name" => "value"
* @return array database response.
* @param array $command command specification.
* @param array $options options in format: "name" => "value"
* @return array database response.
* @throws Exception on failure.
*/
public function executeCommand($command, $options = [])
......@@ -151,7 +151,7 @@ class Database extends Object
/**
* Checks if command execution result ended with an error.
* @param mixed $result raw command execution result.
* @param mixed $result raw command execution result.
* @throws Exception if an error occurred.
*/
protected function tryResultError($result)
......
......@@ -111,7 +111,7 @@ class Session extends \yii\web\Session
/**
* Session read handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $id session ID
* @return string the session data
*/
public function readSession($id)
......@@ -131,8 +131,8 @@ class Session extends \yii\web\Session
/**
* Session write handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $data session data
* @param string $id session ID
* @param string $data session data
* @return boolean whether session write is successful
*/
public function writeSession($id, $data)
......@@ -164,7 +164,7 @@ class Session extends \yii\web\Session
/**
* Session destroy handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $id session ID
* @return boolean whether session is destroyed successfully
*/
public function destroySession($id)
......@@ -180,7 +180,7 @@ class Session extends \yii\web\Session
/**
* Session GC (garbage collection) handler.
* Do not call this method directly.
* @param integer $maxLifetime the number of seconds after which data will be seen as 'garbage' and cleaned up.
* @param integer $maxLifetime the number of seconds after which data will be seen as 'garbage' and cleaned up.
* @return boolean whether session is GCed successfully
*/
public function gcSession($maxLifetime)
......
......@@ -54,9 +54,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns all results as an array.
* @param \yii\mongodb\Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
* @param \yii\mongodb\Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null)
{
......@@ -81,11 +81,11 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns a single row of result.
* @param \yii\mongodb\Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @param \yii\mongodb\Connection $db the Mongo connection used to execute the query.
* If null, the Mongo connection returned by [[modelClass]] will be used.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]],
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
*/
public function one($db = null)
{
......@@ -116,8 +116,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Returns the Mongo collection for this query.
* @param \yii\mongodb\Connection $db Mongo connection.
* @return Collection collection instance.
* @param \yii\mongodb\Connection $db Mongo connection.
* @return Collection collection instance.
*/
public function getCollection($db = null)
{
......
......@@ -206,8 +206,8 @@ abstract class ActiveRecord extends \yii\mongodb\ActiveRecord
/**
* Extracts filename from given raw file value.
* @param mixed $file raw file value.
* @return string file name.
* @param mixed $file raw file value.
* @return string file name.
* @throws \yii\base\InvalidParamException on invalid file value.
*/
protected function extractFileName($file)
......@@ -239,7 +239,7 @@ abstract class ActiveRecord extends \yii\mongodb\ActiveRecord
/**
* Returns the associated file content.
* @return null|string file content.
* @return null|string file content.
* @throws \yii\base\InvalidParamException on invalid file attribute value.
*/
public function getFileContent()
......@@ -272,8 +272,8 @@ abstract class ActiveRecord extends \yii\mongodb\ActiveRecord
/**
* Writes the the internal file content into the given filename.
* @param string $filename full filename to be written.
* @return boolean whether the operation was successful.
* @param string $filename full filename to be written.
* @return boolean whether the operation was successful.
* @throws \yii\base\InvalidParamException on invalid file attribute value.
*/
public function writeFile($filename)
......@@ -303,7 +303,7 @@ abstract class ActiveRecord extends \yii\mongodb\ActiveRecord
* This method returns a stream resource that can be used with all file functions in PHP,
* which deal with reading files. The contents of the file are pulled out of MongoDB on the fly,
* so that the whole file does not have to be loaded into memory first.
* @return resource file stream resource.
* @return resource file stream resource.
* @throws \yii\base\InvalidParamException on invalid file attribute value.
*/
public function getFileResource()
......
......@@ -35,7 +35,7 @@ class Collection extends \yii\mongodb\Collection
/**
* Returns the Mongo collection for the file chunks.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @param boolean $refresh whether to reload the collection instance even if it is found in the cache.
* @return \yii\mongodb\Collection mongo collection instance.
*/
public function getChunkCollection($refresh = false)
......@@ -52,10 +52,10 @@ class Collection extends \yii\mongodb\Collection
/**
* Removes data from the collection.
* @param array $condition description of records to remove.
* @param array $options list of options in format: optionName => optionValue.
* @param array $condition description of records to remove.
* @param array $options list of options in format: optionName => optionValue.
* @return integer|boolean number of updated documents or whether operation was successful.
* @throws Exception on failure.
* @throws Exception on failure.
*/
public function remove($condition = [], $options = [])
{
......@@ -68,11 +68,11 @@ class Collection extends \yii\mongodb\Collection
/**
* Creates new file in GridFS collection from given local filesystem file.
* Additional attributes can be added file document using $metadata.
* @param string $filename name of the file to store.
* @param array $metadata other metadata fields to include in the file document.
* @param array $options list of options in format: optionName => optionValue
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @param string $filename name of the file to store.
* @param array $metadata other metadata fields to include in the file document.
* @param array $options list of options in format: optionName => optionValue
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @throws Exception on failure.
*/
public function insertFile($filename, $metadata = [], $options = [])
......@@ -95,11 +95,11 @@ class Collection extends \yii\mongodb\Collection
/**
* Creates new file in GridFS collection with specified content.
* Additional attributes can be added file document using $metadata.
* @param string $bytes string of bytes to store.
* @param array $metadata other metadata fields to include in the file document.
* @param array $options list of options in format: optionName => optionValue
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @param string $bytes string of bytes to store.
* @param array $metadata other metadata fields to include in the file document.
* @param array $options list of options in format: optionName => optionValue
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @throws Exception on failure.
*/
public function insertFileContent($bytes, $metadata = [], $options = [])
......@@ -122,11 +122,11 @@ class Collection extends \yii\mongodb\Collection
/**
* Creates new file in GridFS collection from uploaded file.
* Additional attributes can be added file document using $metadata.
* @param string $name name of the uploaded file to store. This should correspond to
* the file field's name attribute in the HTML form.
* @param array $metadata other metadata fields to include in the file document.
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @param string $name name of the uploaded file to store. This should correspond to
* the file field's name attribute in the HTML form.
* @param array $metadata other metadata fields to include in the file document.
* @return mixed the "_id" of the saved file document. This will be a generated [[\MongoId]]
* unless an "_id" was explicitly specified in the metadata.
* @throws Exception on failure.
*/
public function insertUploads($name, $metadata = [])
......@@ -147,9 +147,9 @@ class Collection extends \yii\mongodb\Collection
/**
* Retrieves the file with given _id.
* @param mixed $id _id of the file to find.
* @param mixed $id _id of the file to find.
* @return \MongoGridFSFile|null found file, or null if file does not exist
* @throws Exception on failure.
* @throws Exception on failure.
*/
public function get($id)
{
......@@ -169,8 +169,8 @@ class Collection extends \yii\mongodb\Collection
/**
* Deletes the file with given _id.
* @param mixed $id _id of the file to find.
* @return boolean whether the operation was successful.
* @param mixed $id _id of the file to find.
* @return boolean whether the operation was successful.
* @throws Exception on failure.
*/
public function delete($id)
......
......@@ -25,8 +25,8 @@ class Query extends \yii\mongodb\Query
{
/**
* Returns the Mongo collection for this query.
* @param \yii\mongodb\Connection $db Mongo connection.
* @return Collection collection instance.
* @param \yii\mongodb\Connection $db Mongo connection.
* @return Collection collection instance.
*/
public function getCollection($db = null)
{
......@@ -38,10 +38,10 @@ class Query extends \yii\mongodb\Query
}
/**
* @param \MongoGridFSCursor $cursor Mongo cursor instance to fetch data from.
* @param boolean $all whether to fetch all rows or only first one.
* @param string|callable $indexBy value to index by.
* @return array|boolean result.
* @param \MongoGridFSCursor $cursor Mongo cursor instance to fetch data from.
* @param boolean $all whether to fetch all rows or only first one.
* @param string|callable $indexBy value to index by.
* @return array|boolean result.
* @see Query::fetchRows()
*/
protected function fetchRowsInternal($cursor, $all, $indexBy)
......
......@@ -141,9 +141,9 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAll(['status' => 1], ['id' => 2]);
* ~~~
*
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @return integer the number of rows updated
*/
public static function updateAll($attributes, $condition = null)
......@@ -193,10 +193,10 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAllCounters(['age' => 1]);
* ~~~
*
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @param array $counters the counters to be updated (attribute name => increment value).
* Use negative values if you want to decrement the counters.
* @param array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @return integer the number of rows updated
*/
public static function updateAllCounters($counters, $condition = null)
......@@ -227,8 +227,8 @@ class ActiveRecord extends BaseActiveRecord
* Customer::deleteAll(['status' => 3]);
* ~~~
*
* @param array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @param array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* Please refer to [[ActiveQuery::where()]] on how to specify this parameter.
* @return integer the number of rows deleted
*/
public static function deleteAll($condition = null)
......@@ -275,7 +275,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Builds a normalized key from a given primary key value.
*
* @param mixed $key the key to be normalized
* @param mixed $key the key to be normalized
* @return string the generated key
*/
public static function buildKey($key)
......
......@@ -94,8 +94,8 @@ class Cache extends \yii\caching\Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......
......@@ -313,8 +313,8 @@ class Connection extends Component
/**
*
* @param string $name
* @param array $params
* @param string $name
* @param array $params
* @return mixed
*/
public function __call($name, $params)
......@@ -331,10 +331,10 @@ class Connection extends Component
* Executes a redis command.
* For a list of available commands and their parameters see http://redis.io/commands.
*
* @param string $name the name of the command
* @param array $params list of parameters for the command
* @param string $name the name of the command
* @param array $params list of parameters for the command
* @return array|bool|null|string Dependend on the executed command this method
* will return different data types:
* will return different data types:
*
* - `true` for commands that return "status reply".
* - `string` for commands that return "integer reply"
......
......@@ -22,7 +22,7 @@ class LuaScriptBuilder extends \yii\base\Object
{
/**
* Builds a Lua script for finding a list of records
* @param ActiveQuery $query the query used to build the script
* @param ActiveQuery $query the query used to build the script
* @return string
*/
public function buildAll($query)
......@@ -37,7 +37,7 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding one record
* @param ActiveQuery $query the query used to build the script
* @param ActiveQuery $query the query used to build the script
* @return string
*/
public function buildOne($query)
......@@ -52,8 +52,8 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding a column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @return string
*/
public function buildColumn($query, $column)
......@@ -68,7 +68,7 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for getting count of records
* @param ActiveQuery $query the query used to build the script
* @param ActiveQuery $query the query used to build the script
* @return string
*/
public function buildCount($query)
......@@ -78,8 +78,8 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding the sum of a column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @return string
*/
public function buildSum($query, $column)
......@@ -93,8 +93,8 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding the average of a column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @return string
*/
public function buildAverage($query, $column)
......@@ -108,8 +108,8 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding the min value of a column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @return string
*/
public function buildMin($query, $column)
......@@ -123,8 +123,8 @@ class LuaScriptBuilder extends \yii\base\Object
/**
* Builds a Lua script for finding the max value of a column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @param ActiveQuery $query the query used to build the script
* @param string $column name of the column
* @return string
*/
public function buildMax($query, $column)
......@@ -137,9 +137,9 @@ class LuaScriptBuilder extends \yii\base\Object
}
/**
* @param ActiveQuery $query the query used to build the script
* @param string $buildResult the lua script for building the result
* @param string $return the lua variable that should be returned
* @param ActiveQuery $query the query used to build the script
* @param string $buildResult the lua script for building the result
* @param string $return the lua variable that should be returned
* @throws NotSupportedException when query contains unsupported order by condition
* @return string
*/
......@@ -188,8 +188,8 @@ EOF;
/**
* Adds a column to the list of columns to retrieve and creates an alias
* @param string $column the column name to add
* @param array $columns list of columns given by reference
* @param string $column the column name to add
* @param array $columns list of columns given by reference
* @return string the alias generated for the column name
*/
private function addColumn($column, &$columns)
......@@ -205,7 +205,7 @@ EOF;
/**
* Quotes a string value for use in a query.
* Note that if the parameter is not a string or int, it will be returned without change.
* @param string $str string to be quoted
* @param string $str string to be quoted
* @return string the properly quoted string
*/
private function quoteValue($str)
......@@ -219,11 +219,11 @@ EOF;
/**
* Parses the condition specification and generates the corresponding Lua expression.
* @param string|array $condition the condition specification. Please refer to [[ActiveQuery::where()]]
* on how to specify a condition.
* @param array $columns the list of columns and aliases to be used
* @return string the generated SQL expression
* @throws \yii\db\Exception if the condition is in bad format
* @param string|array $condition the condition specification. Please refer to [[ActiveQuery::where()]]
* on how to specify a condition.
* @param array $columns the list of columns and aliases to be used
* @return string the generated SQL expression
* @throws \yii\db\Exception if the condition is in bad format
* @throws \yii\base\NotSupportedException if the condition is not an array
*/
public function buildCondition($condition, &$columns)
......
......@@ -109,7 +109,7 @@ class Session extends \yii\web\Session
/**
* Session read handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $id session ID
* @return string the session data
*/
public function readSession($id)
......@@ -122,8 +122,8 @@ class Session extends \yii\web\Session
/**
* Session write handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $data session data
* @param string $id session ID
* @param string $data session data
* @return boolean whether session write is successful
*/
public function writeSession($id, $data)
......@@ -134,7 +134,7 @@ class Session extends \yii\web\Session
/**
* Session destroy handler.
* Do not call this method directly.
* @param string $id session ID
* @param string $id session ID
* @return boolean whether session is destroyed successfully
*/
public function destroySession($id)
......@@ -144,7 +144,7 @@ class Session extends \yii\web\Session
/**
* Generates a unique key used for storing session data in cache.
* @param string $id session variable name
* @param string $id session variable name
* @return string a safe cache key associated with the session variable name
*/
protected function calculateKey($id)
......
......@@ -77,9 +77,9 @@ class ViewRenderer extends BaseViewRenderer
* This method is invoked by [[View]] whenever it tries to render a view.
* Child classes must implement this method to render the given view file.
*
* @param View $view the view object used for rendering the file.
* @param string $file the view file.
* @param array $params the parameters to be passed to the view file.
* @param View $view the view object used for rendering the file.
* @param string $file the view file.
* @param array $params the parameters to be passed to the view file.
*
* @return string the rendering result
*/
......
......@@ -133,9 +133,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns all results as an array.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null)
{
......@@ -161,11 +161,11 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns a single row of result.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]],
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
* the query result may be either an array or an ActiveRecord object. Null will be returned
* if the query results in nothing.
*/
public function one($db = null)
{
......@@ -198,9 +198,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Creates a DB command that can be used to execute this query.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return Command the created DB command instance.
* @param Connection $db the DB connection used to create the DB command.
* If null, the DB connection returned by [[modelClass]] will be used.
* @return Command the created DB command instance.
*/
public function createCommand($db = null)
{
......@@ -251,9 +251,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Fetches the source for the snippets using [[ActiveRecord::getSnippetSource()]] method.
* @param ActiveRecord[] $models raw query result rows.
* @param ActiveRecord[] $models raw query result rows.
* @throws \yii\base\InvalidCallException if [[asArray]] enabled.
* @return array snippet source strings
* @return array snippet source strings
*/
protected function fetchSnippetSourceFromModels($models)
{
......
......@@ -57,7 +57,7 @@ class ColumnSchema extends Object
/**
* Converts the input value according to [[phpType]].
* If the value is null or an [[Expression]], it will not be converted.
* @param mixed $value input value
* @param mixed $value input value
* @return mixed converted value
*/
public function typecast($value)
......
......@@ -63,9 +63,9 @@ class Command extends \yii\db\Command
*
* Note that the values in each row must match the corresponding column names.
*
* @param string $index the index that new rows will be inserted into.
* @param array $columns the column names
* @param array $rows the rows to be batch inserted into the index
* @param string $index the index that new rows will be inserted into.
* @param array $columns the column names
* @param array $rows the rows to be batch inserted into the index
* @return static the command object itself
*/
public function batchInsert($index, $columns, $rows)
......@@ -91,8 +91,8 @@ class Command extends \yii\db\Command
*
* Note that the created command is not executed until [[execute()]] is called.
*
* @param string $index the index that new rows will be replaced into.
* @param array $columns the column data (name => value) to be replaced into the index.
* @param string $index the index that new rows will be replaced into.
* @param array $columns the column data (name => value) to be replaced into the index.
* @return static the command object itself
*/
public function replace($index, $columns)
......@@ -117,9 +117,9 @@ class Command extends \yii\db\Command
*
* Note that the values in each row must match the corresponding column names.
*
* @param string $index the index that new rows will be replaced.
* @param array $columns the column names
* @param array $rows the rows to be batch replaced in the index
* @param string $index the index that new rows will be replaced.
* @param array $columns the column names
* @param array $rows the rows to be batch replaced in the index
* @return static the command object itself
*/
public function batchReplace($index, $columns, $rows)
......@@ -142,13 +142,13 @@ class Command extends \yii\db\Command
*
* Note that the created command is not executed until [[execute()]] is called.
*
* @param string $index the index to be updated.
* @param array $columns the column data (name => value) to be updated.
* @param string|array $condition the condition that will be put in the WHERE part. Please
* refer to [[Query::where()]] on how to specify condition.
* @param array $params the parameters to be bound to the command
* @param array $options list of options in format: optionName => optionValue
* @return static the command object itself
* @param string $index the index to be updated.
* @param array $columns the column data (name => value) to be updated.
* @param string|array $condition the condition that will be put in the WHERE part. Please
* refer to [[Query::where()]] on how to specify condition.
* @param array $params the parameters to be bound to the command
* @param array $options list of options in format: optionName => optionValue
* @return static the command object itself
*/
public function update($index, $columns, $condition = '', $params = [], $options = [])
{
......@@ -159,7 +159,7 @@ class Command extends \yii\db\Command
/**
* Creates a SQL command for truncating a runtime index.
* @param string $index the index to be truncated. The name will be properly quoted by the method.
* @param string $index the index to be truncated. The name will be properly quoted by the method.
* @return static the command object itself
*/
public function truncateIndex($index)
......@@ -171,12 +171,12 @@ class Command extends \yii\db\Command
/**
* Builds a snippet from provided data and query, using specified index settings.
* @param string $index name of the index, from which to take the text processing settings.
* @param string|array $source is the source data to extract a snippet from.
* It could be either a single string or array of strings.
* @param string $match the full-text query to build snippets for.
* @param array $options list of options in format: optionName => optionValue
* @return static the command object itself
* @param string $index name of the index, from which to take the text processing settings.
* @param string|array $source is the source data to extract a snippet from.
* It could be either a single string or array of strings.
* @param string $match the full-text query to build snippets for.
* @param array $options list of options in format: optionName => optionValue
* @return static the command object itself
*/
public function callSnippets($index, $source, $match, $options = [])
{
......@@ -188,10 +188,10 @@ class Command extends \yii\db\Command
/**
* Returns tokenized and normalized forms of the keywords, and, optionally, keyword statistics.
* @param string $index the name of the index from which to take the text processing settings
* @param string $text the text to break down to keywords.
* @param boolean $fetchStatistic whether to return document and hit occurrence statistics
* @return string the SQL statement for call keywords.
* @param string $index the name of the index from which to take the text processing settings
* @param string $text the text to break down to keywords.
* @param boolean $fetchStatistic whether to return document and hit occurrence statistics
* @return string the SQL statement for call keywords.
*/
public function callKeywords($index, $text, $fetchStatistic = false)
{
......
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