diff --git a/build/controllers/PhpDocController.php b/build/controllers/PhpDocController.php index e7edbed..b0e57b3 100644 --- a/build/controllers/PhpDocController.php +++ b/build/controllers/PhpDocController.php @@ -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)))); } } } diff --git a/extensions/apidoc/commands/ApiController.php b/extensions/apidoc/commands/ApiController.php index 9c9e286..927fbf2 100644 --- a/extensions/apidoc/commands/ApiController.php +++ b/extensions/apidoc/commands/ApiController.php @@ -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) diff --git a/extensions/apidoc/commands/GuideController.php b/extensions/apidoc/commands/GuideController.php index 754d49d..d0450b1 100644 --- a/extensions/apidoc/commands/GuideController.php +++ b/extensions/apidoc/commands/GuideController.php @@ -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) diff --git a/extensions/apidoc/components/BaseController.php b/extensions/apidoc/components/BaseController.php index e62ef37..23b9797 100644 --- a/extensions/apidoc/components/BaseController.php +++ b/extensions/apidoc/components/BaseController.php @@ -118,7 +118,7 @@ abstract class BaseController extends Controller } /** - * @param string $template + * @param string $template * @return BaseRenderer */ abstract protected function findRenderer($template); diff --git a/extensions/apidoc/helpers/ApiMarkdown.php b/extensions/apidoc/helpers/ApiMarkdown.php index d127b1a..6f01c1c 100644 --- a/extensions/apidoc/helpers/ApiMarkdown.php +++ b/extensions/apidoc/helpers/ApiMarkdown.php @@ -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) diff --git a/extensions/apidoc/helpers/PrettyPrinter.php b/extensions/apidoc/helpers/PrettyPrinter.php index 3370e86..3156853 100644 --- a/extensions/apidoc/helpers/PrettyPrinter.php +++ b/extensions/apidoc/helpers/PrettyPrinter.php @@ -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) diff --git a/extensions/apidoc/models/BaseDoc.php b/extensions/apidoc/models/BaseDoc.php index 753b3c8..7e1ed94 100644 --- a/extensions/apidoc/models/BaseDoc.php +++ b/extensions/apidoc/models/BaseDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/ClassDoc.php b/extensions/apidoc/models/ClassDoc.php index 1bb4d70..60dabf5 100644 --- a/extensions/apidoc/models/ClassDoc.php +++ b/extensions/apidoc/models/ClassDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/ConstDoc.php b/extensions/apidoc/models/ConstDoc.php index 69fd602..9ed9a03 100644 --- a/extensions/apidoc/models/ConstDoc.php +++ b/extensions/apidoc/models/ConstDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/Context.php b/extensions/apidoc/models/Context.php index fa34d0a..df5f6e3 100644 --- a/extensions/apidoc/models/Context.php +++ b/extensions/apidoc/models/Context.php @@ -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) diff --git a/extensions/apidoc/models/EventDoc.php b/extensions/apidoc/models/EventDoc.php index 608dcb4..5e23b37 100644 --- a/extensions/apidoc/models/EventDoc.php +++ b/extensions/apidoc/models/EventDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/FunctionDoc.php b/extensions/apidoc/models/FunctionDoc.php index e77c8e4..c844e31 100644 --- a/extensions/apidoc/models/FunctionDoc.php +++ b/extensions/apidoc/models/FunctionDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/InterfaceDoc.php b/extensions/apidoc/models/InterfaceDoc.php index e796911..461302d 100644 --- a/extensions/apidoc/models/InterfaceDoc.php +++ b/extensions/apidoc/models/InterfaceDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/MethodDoc.php b/extensions/apidoc/models/MethodDoc.php index 9d19800..c420a54 100644 --- a/extensions/apidoc/models/MethodDoc.php +++ b/extensions/apidoc/models/MethodDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/ParamDoc.php b/extensions/apidoc/models/ParamDoc.php index e7830ee..87b7f5f 100644 --- a/extensions/apidoc/models/ParamDoc.php +++ b/extensions/apidoc/models/ParamDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/PropertyDoc.php b/extensions/apidoc/models/PropertyDoc.php index 3ced2b8..6712033 100644 --- a/extensions/apidoc/models/PropertyDoc.php +++ b/extensions/apidoc/models/PropertyDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/TraitDoc.php b/extensions/apidoc/models/TraitDoc.php index 981ad9c..6dd6eb5 100644 --- a/extensions/apidoc/models/TraitDoc.php +++ b/extensions/apidoc/models/TraitDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/models/TypeDoc.php b/extensions/apidoc/models/TypeDoc.php index c5be79c..12bbc57 100644 --- a/extensions/apidoc/models/TypeDoc.php +++ b/extensions/apidoc/models/TypeDoc.php @@ -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 = []) { diff --git a/extensions/apidoc/renderers/BaseRenderer.php b/extensions/apidoc/renderers/BaseRenderer.php index 4484227..f1a25c9 100644 --- a/extensions/apidoc/renderers/BaseRenderer.php +++ b/extensions/apidoc/renderers/BaseRenderer.php @@ -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) diff --git a/extensions/apidoc/templates/bootstrap/SideNavWidget.php b/extensions/apidoc/templates/bootstrap/SideNavWidget.php index 294141c..9baeb4c 100644 --- a/extensions/apidoc/templates/bootstrap/SideNavWidget.php +++ b/extensions/apidoc/templates/bootstrap/SideNavWidget.php @@ -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) { diff --git a/extensions/apidoc/templates/html/ApiRenderer.php b/extensions/apidoc/templates/html/ApiRenderer.php index d950ae5..bc58866 100644 --- a/extensions/apidoc/templates/html/ApiRenderer.php +++ b/extensions/apidoc/templates/html/ApiRenderer.php @@ -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) diff --git a/extensions/authclient/AuthAction.php b/extensions/authclient/AuthAction.php index 2b0f536..77f4b75 100644 --- a/extensions/authclient/AuthAction.php +++ b/extensions/authclient/AuthAction.php @@ -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) diff --git a/extensions/authclient/BaseClient.php b/extensions/authclient/BaseClient.php index 86dd0a6..857fa43 100644 --- a/extensions/authclient/BaseClient.php +++ b/extensions/authclient/BaseClient.php @@ -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) diff --git a/extensions/authclient/BaseOAuth.php b/extensions/authclient/BaseOAuth.php index 3823530..4910e78 100644 --- a/extensions/authclient/BaseOAuth.php +++ b/extensions/authclient/BaseOAuth.php @@ -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); } diff --git a/extensions/authclient/Collection.php b/extensions/authclient/Collection.php index e4a03a9..d777dca 100644 --- a/extensions/authclient/Collection.php +++ b/extensions/authclient/Collection.php @@ -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) diff --git a/extensions/authclient/OAuth1.php b/extensions/authclient/OAuth1.php index 329e0ec..a6a44a8 100644 --- a/extensions/authclient/OAuth1.php +++ b/extensions/authclient/OAuth1.php @@ -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 = '') diff --git a/extensions/authclient/OAuth2.php b/extensions/authclient/OAuth2.php index 518154b..3f8d7b8 100644 --- a/extensions/authclient/OAuth2.php +++ b/extensions/authclient/OAuth2.php @@ -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 = []) diff --git a/extensions/authclient/OAuthToken.php b/extensions/authclient/OAuthToken.php index efc96b8..85ded1b 100644 --- a/extensions/authclient/OAuthToken.php +++ b/extensions/authclient/OAuthToken.php @@ -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) diff --git a/extensions/authclient/OpenId.php b/extensions/authclient/OpenId.php index 4dc134d..95c6bd0 100644 --- a/extensions/authclient/OpenId.php +++ b/extensions/authclient/OpenId.php @@ -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) diff --git a/extensions/authclient/signature/BaseMethod.php b/extensions/authclient/signature/BaseMethod.php index c98b019..c4873af 100644 --- a/extensions/authclient/signature/BaseMethod.php +++ b/extensions/authclient/signature/BaseMethod.php @@ -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) diff --git a/extensions/authclient/signature/RsaSha1.php b/extensions/authclient/signature/RsaSha1.php index 044e7ab..5d11a42 100644 --- a/extensions/authclient/signature/RsaSha1.php +++ b/extensions/authclient/signature/RsaSha1.php @@ -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() { diff --git a/extensions/authclient/widgets/AuthChoice.php b/extensions/authclient/widgets/AuthChoice.php index ee3a878..d6f152a 100644 --- a/extensions/authclient/widgets/AuthChoice.php +++ b/extensions/authclient/widgets/AuthChoice.php @@ -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) { diff --git a/extensions/bootstrap/Carousel.php b/extensions/bootstrap/Carousel.php index 40291a2..90fe0bd 100644 --- a/extensions/bootstrap/Carousel.php +++ b/extensions/bootstrap/Carousel.php @@ -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) diff --git a/extensions/bootstrap/Collapse.php b/extensions/bootstrap/Collapse.php index b8fb97c..c4f42ca 100644 --- a/extensions/bootstrap/Collapse.php +++ b/extensions/bootstrap/Collapse.php @@ -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) diff --git a/extensions/bootstrap/Dropdown.php b/extensions/bootstrap/Dropdown.php index 8109add..fa8f178 100644 --- a/extensions/bootstrap/Dropdown.php +++ b/extensions/bootstrap/Dropdown.php @@ -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) diff --git a/extensions/bootstrap/Nav.php b/extensions/bootstrap/Nav.php index a215914..fb9e560 100644 --- a/extensions/bootstrap/Nav.php +++ b/extensions/bootstrap/Nav.php @@ -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) diff --git a/extensions/bootstrap/NavBar.php b/extensions/bootstrap/NavBar.php index ab681d1..af41725 100644 --- a/extensions/bootstrap/NavBar.php +++ b/extensions/bootstrap/NavBar.php @@ -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; /** diff --git a/extensions/bootstrap/Progress.php b/extensions/bootstrap/Progress.php index ec0827a..1c466f6 100644 --- a/extensions/bootstrap/Progress.php +++ b/extensions/bootstrap/Progress.php @@ -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 = []) { diff --git a/extensions/bootstrap/Tabs.php b/extensions/bootstrap/Tabs.php index 7c7274a..b5669f6 100644 --- a/extensions/bootstrap/Tabs.php +++ b/extensions/bootstrap/Tabs.php @@ -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) diff --git a/extensions/codeception/BasePage.php b/extensions/codeception/BasePage.php index 33c6e36..8f4d129 100644 --- a/extensions/codeception/BasePage.php +++ b/extensions/codeception/BasePage.php @@ -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 = []) { diff --git a/extensions/codeception/TestCase.php b/extensions/codeception/TestCase.php index de0f1a7..c1b6952 100644 --- a/extensions/codeception/TestCase.php +++ b/extensions/codeception/TestCase.php @@ -1,4 +1,9 @@ <?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) { diff --git a/extensions/composer/Installer.php b/extensions/composer/Installer.php index e597101..1ace16b 100644 --- a/extensions/composer/Installer.php +++ b/extensions/composer/Installer.php @@ -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'); diff --git a/extensions/debug/LogTarget.php b/extensions/debug/LogTarget.php index 10c75a3..3a402f5 100644 --- a/extensions/debug/LogTarget.php +++ b/extensions/debug/LogTarget.php @@ -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) { diff --git a/extensions/debug/components/search/Filter.php b/extensions/debug/components/search/Filter.php index 0983082..6a3de14 100644 --- a/extensions/debug/components/search/Filter.php +++ b/extensions/debug/components/search/Filter.php @@ -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) diff --git a/extensions/debug/components/search/matchers/MatcherInterface.php b/extensions/debug/components/search/matchers/MatcherInterface.php index c601bbc..88fb3af 100644 --- a/extensions/debug/components/search/matchers/MatcherInterface.php +++ b/extensions/debug/components/search/matchers/MatcherInterface.php @@ -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); diff --git a/extensions/debug/models/search/Base.php b/extensions/debug/models/search/Base.php index e8783a7..dd20fb8 100644 --- a/extensions/debug/models/search/Base.php +++ b/extensions/debug/models/search/Base.php @@ -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) { diff --git a/extensions/debug/models/search/Db.php b/extensions/debug/models/search/Db.php index 03ae100..da1d6fb 100644 --- a/extensions/debug/models/search/Db.php +++ b/extensions/debug/models/search/Db.php @@ -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) diff --git a/extensions/debug/models/search/Debug.php b/extensions/debug/models/search/Debug.php index 9e6a406..48863ea 100644 --- a/extensions/debug/models/search/Debug.php +++ b/extensions/debug/models/search/Debug.php @@ -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) diff --git a/extensions/debug/models/search/Log.php b/extensions/debug/models/search/Log.php index 56b3057..9d8814d 100644 --- a/extensions/debug/models/search/Log.php +++ b/extensions/debug/models/search/Log.php @@ -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) diff --git a/extensions/debug/models/search/Mail.php b/extensions/debug/models/search/Mail.php index bf69b29..c1fac4c 100644 --- a/extensions/debug/models/search/Mail.php +++ b/extensions/debug/models/search/Mail.php @@ -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) diff --git a/extensions/debug/models/search/Profile.php b/extensions/debug/models/search/Profile.php index 79c31a6..d62df7b 100644 --- a/extensions/debug/models/search/Profile.php +++ b/extensions/debug/models/search/Profile.php @@ -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) diff --git a/extensions/debug/panels/DbPanel.php b/extensions/debug/panels/DbPanel.php index ba68391..ea2c0a3 100644 --- a/extensions/debug/panels/DbPanel.php +++ b/extensions/debug/panels/DbPanel.php @@ -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) diff --git a/extensions/debug/panels/LogPanel.php b/extensions/debug/panels/LogPanel.php index e5f3482..af92474 100644 --- a/extensions/debug/panels/LogPanel.php +++ b/extensions/debug/panels/LogPanel.php @@ -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) { diff --git a/extensions/elasticsearch/ActiveQuery.php b/extensions/elasticsearch/ActiveQuery.php index d0c12cb..4fb02ff 100644 --- a/extensions/elasticsearch/ActiveQuery.php +++ b/extensions/elasticsearch/ActiveQuery.php @@ -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) { diff --git a/extensions/elasticsearch/ActiveRecord.php b/extensions/elasticsearch/ActiveRecord.php index 6998122..b5c1454 100644 --- a/extensions/elasticsearch/ActiveRecord.php +++ b/extensions/elasticsearch/ActiveRecord.php @@ -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 = []) diff --git a/extensions/elasticsearch/Command.php b/extensions/elasticsearch/Command.php index fa4defb..560992b 100644 --- a/extensions/elasticsearch/Command.php +++ b/extensions/elasticsearch/Command.php @@ -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 */ diff --git a/extensions/elasticsearch/Connection.php b/extensions/elasticsearch/Connection.php index f617c66..9ed0289 100644 --- a/extensions/elasticsearch/Connection.php +++ b/extensions/elasticsearch/Connection.php @@ -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 = []) diff --git a/extensions/elasticsearch/Query.php b/extensions/elasticsearch/Query.php index c9ab5f2..dc9996b 100644 --- a/extensions/elasticsearch/Query.php +++ b/extensions/elasticsearch/Query.php @@ -109,9 +109,9 @@ class Query extends Component implements QueryInterface /** * Creates a DB command that can be used to execute this query. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return Command the created DB command instance. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return Command the created DB command instance. */ public function createCommand($db = null) { @@ -126,9 +126,9 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns all results as an array. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return array the query results. If the query results in nothing, an empty array will be returned. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component 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,10 +161,10 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns a single row of result. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. * @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query - * results in nothing. + * results in nothing. */ public function one($db = null) { @@ -183,12 +183,14 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns the complete search result including e.g. hits, facets, totalCount. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @param array $options The options given with this query. Possible options are: - * - [routing](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html#search-routing) - * - [search_type](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html) - * @return array the query results. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @param array $options The options given with this query. Possible options are: + * + * - [routing](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html#search-routing) + * - [search_type](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html) + * + * @return array the query results. */ public function search($db = null, $options = []) { @@ -224,9 +226,9 @@ class Query extends Component implements QueryInterface * * This will not run facet queries. * - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return array the query results. If the query results in nothing, an empty array will be returned. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return array the query results. If the query results in nothing, an empty array will be returned. */ public function delete($db = null) { @@ -237,11 +239,11 @@ class Query extends Component implements QueryInterface /** * Returns the query result as a scalar value. * The value returned will be the specified field in the first document of the query results. - * @param string $field name of the attribute to select - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return string the value of the specified attribute in the first record of the query result. - * Null is returned if the query result is empty or the field does not exist. + * @param string $field name of the attribute to select + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return string the value of the specified attribute in the first record of the query result. + * Null is returned if the query result is empty or the field does not exist. */ public function scalar($field, $db = null) { @@ -255,10 +257,10 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns the first column of the result. - * @param string $field the field to query over - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return array the first column of the query result. An empty array is returned if the query results in nothing. + * @param string $field the field to query over + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return array the first column of the query result. An empty array is returned if the query results in nothing. */ public function column($field, $db = null) { @@ -277,10 +279,10 @@ class Query extends Component implements QueryInterface /** * Returns the number of records. - * @param string $q the COUNT expression. This parameter is ignored by this implementation. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return integer number of records + * @param string $q the COUNT expression. This parameter is ignored by this implementation. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return integer number of records */ public function count($q = '*', $db = null) { @@ -296,9 +298,9 @@ class Query extends Component implements QueryInterface /** * Returns a value indicating whether the query result contains any row of data. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `elasticsearch` application component will be used. - * @return boolean whether the query result contains any row of data. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `elasticsearch` application component will be used. + * @return boolean whether the query result contains any row of data. */ public function exists($db = null) { @@ -307,10 +309,10 @@ class Query extends Component implements QueryInterface /** * Adds a facet search to this query. - * @param string $name the name of this facet - * @param string $type the facet type. e.g. `terms`, `range`, `histogram`... - * @param string|array $options the configuration options for this facet. Can be an array or a json string. - * @return static the query object itself + * @param string $name the name of this facet + * @param string $type the facet type. e.g. `terms`, `range`, `histogram`... + * @param string|array $options the configuration options for this facet. Can be an array or a json string. + * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-query-facet.html */ public function addFacet($name, $type, $options) @@ -321,8 +323,8 @@ class Query extends Component implements QueryInterface /** * The `terms facet` allow to specify field facets that return the N most frequent terms. - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-facet.html */ @@ -334,8 +336,8 @@ class Query extends Component implements QueryInterface /** * Range facet allows to specify a set of ranges and get both the number of docs (count) that fall * within each range, and aggregated data either based on the field, or using another field. - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-range-facet.html */ @@ -348,8 +350,8 @@ class Query extends Component implements QueryInterface * The histogram facet works with numeric data by building a histogram across intervals of the field values. * Each value is "rounded" into an interval (or placed in a bucket), and statistics are provided per * interval/bucket (count and total). - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-histogram-facet.html */ @@ -360,8 +362,8 @@ class Query extends Component implements QueryInterface /** * A specific histogram facet that can work with date field types enhancing it over the regular histogram facet. - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-date-histogram-facet.html */ @@ -373,8 +375,8 @@ class Query extends Component implements QueryInterface /** * A filter facet (not to be confused with a facet filter) allows you to return a count of the hits matching the filter. * The filter itself can be expressed using the Query DSL. - * @param string $name the name of this facet - * @param string $filter the query in Query DSL + * @param string $name the name of this facet + * @param string $filter the query in Query DSL * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-filter-facet.html */ @@ -386,8 +388,8 @@ class Query extends Component implements QueryInterface /** * A facet query allows to return a count of the hits matching the facet query. * The query itself can be expressed using the Query DSL. - * @param string $name the name of this facet - * @param string $query the query in Query DSL + * @param string $name the name of this facet + * @param string $query the query in Query DSL * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-query-facet.html */ @@ -399,8 +401,8 @@ class Query extends Component implements QueryInterface /** * Statistical facet allows to compute statistical data on a numeric fields. The statistical data include count, * total, sum of squares, mean (average), minimum, maximum, variance, and standard deviation. - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-statistical-facet.html */ @@ -412,8 +414,8 @@ class Query extends Component implements QueryInterface /** * The `terms_stats` facet combines both the terms and statistical allowing to compute stats computed on a field, * per term value driven by another field. - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-stats-facet.html */ @@ -425,8 +427,8 @@ class Query extends Component implements QueryInterface /** * The `geo_distance` facet is a facet providing information for ranges of distances from a provided `geo_point` * including count of the number of hits that fall within each range, and aggregation information (like `total`). - * @param string $name the name of this facet - * @param array $options additional option. Please refer to the elasticsearch documentation for details. + * @param string $name the name of this facet + * @param array $options additional option. Please refer to the elasticsearch documentation for details. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-geo-distance-facet.html */ @@ -443,7 +445,7 @@ class Query extends Component implements QueryInterface /** * Sets the querypart of this search query. - * @param string $query + * @param string $query * @return static the query object itself */ public function query($query) @@ -454,7 +456,7 @@ class Query extends Component implements QueryInterface /** * Sets the filter part of this search query. - * @param string $filter + * @param string $filter * @return static the query object itself */ public function filter($filter) @@ -465,11 +467,11 @@ class Query extends Component implements QueryInterface /** * Sets the index and type to retrieve documents from. - * @param string|array $index The index to retrieve data from. This can be a string representing a single index - * or a an array of multiple indexes. If this is `null` it means that all indexes are being queried. - * @param string|array $type The type to retrieve data from. This can be a string representing a single type - * or a an array of multiple types. If this is `null` it means that all types are being queried. - * @return static the query object itself + * @param string|array $index The index to retrieve data from. This can be a string representing a single index + * or a an array of multiple indexes. If this is `null` it means that all indexes are being queried. + * @param string|array $type The type to retrieve data from. This can be a string representing a single type + * or a an array of multiple types. If this is `null` it means that all types are being queried. + * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-search.html#search-multi-index-type */ public function from($index, $type = null) @@ -481,7 +483,7 @@ class Query extends Component implements QueryInterface /** * Sets the fields to retrieve from the documents. - * @param array $fields the fields to be selected. + * @param array $fields the fields to be selected. * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html */ @@ -497,9 +499,9 @@ class Query extends Component implements QueryInterface /** * Sets the search timeout. - * @param integer $timeout A search timeout, bounding the search request to be executed within the specified time value - * and bail with the hits accumulated up to that point when expired. Defaults to no timeout. - * @return static the query object itself + * @param integer $timeout A search timeout, bounding the search request to be executed within the specified time value + * and bail with the hits accumulated up to that point when expired. Defaults to no timeout. + * @return static the query object itself * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-body.html#_parameters_3 */ public function timeout($timeout) diff --git a/extensions/elasticsearch/QueryBuilder.php b/extensions/elasticsearch/QueryBuilder.php index 6756d42..7d0e770 100644 --- a/extensions/elasticsearch/QueryBuilder.php +++ b/extensions/elasticsearch/QueryBuilder.php @@ -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 diff --git a/extensions/faker/FixtureController.php b/extensions/faker/FixtureController.php index fdac7b2..7cc38b7 100644 --- a/extensions/faker/FixtureController.php +++ b/extensions/faker/FixtureController.php @@ -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) diff --git a/extensions/gii/CodeFile.php b/extensions/gii/CodeFile.php index 0fb9098..7fa57cc 100644 --- a/extensions/gii/CodeFile.php +++ b/extensions/gii/CodeFile.php @@ -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) diff --git a/extensions/gii/Generator.php b/extensions/gii/Generator.php index 16b869c..3273582 100644 --- a/extensions/gii/Generator.php +++ b/extensions/gii/Generator.php @@ -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) diff --git a/extensions/gii/components/ActiveField.php b/extensions/gii/components/ActiveField.php index 13fc828..c444b7b 100644 --- a/extensions/gii/components/ActiveField.php +++ b/extensions/gii/components/ActiveField.php @@ -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) diff --git a/extensions/gii/controllers/DefaultController.php b/extensions/gii/controllers/DefaultController.php index a5cb57e..438fc3b 100644 --- a/extensions/gii/controllers/DefaultController.php +++ b/extensions/gii/controllers/DefaultController.php @@ -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) diff --git a/extensions/gii/generators/controller/Generator.php b/extensions/gii/generators/controller/Generator.php index 7393397..40cbaa4 100644 --- a/extensions/gii/generators/controller/Generator.php +++ b/extensions/gii/generators/controller/Generator.php @@ -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) diff --git a/extensions/gii/generators/crud/Generator.php b/extensions/gii/generators/crud/Generator.php index 97c0512..7bee53e 100644 --- a/extensions/gii/generators/crud/Generator.php +++ b/extensions/gii/generators/crud/Generator.php @@ -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) diff --git a/extensions/gii/generators/model/Generator.php b/extensions/gii/generators/model/Generator.php index c6d2b09..9a94016 100644 --- a/extensions/gii/generators/model/Generator.php +++ b/extensions/gii/generators/model/Generator.php @@ -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) { diff --git a/extensions/imagine/BaseImage.php b/extensions/imagine/BaseImage.php index a511cc2..1cd51c0 100644 --- a/extensions/imagine/BaseImage.php +++ b/extensions/imagine/BaseImage.php @@ -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) diff --git a/extensions/jui/Accordion.php b/extensions/jui/Accordion.php index d4d4dcd..7847e78 100644 --- a/extensions/jui/Accordion.php +++ b/extensions/jui/Accordion.php @@ -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() diff --git a/extensions/jui/AutoComplete.php b/extensions/jui/AutoComplete.php index 6617b2d..8baa544 100644 --- a/extensions/jui/AutoComplete.php +++ b/extensions/jui/AutoComplete.php @@ -33,7 +33,7 @@ use yii\helpers\Html; * 'source' => ['USA', 'RUS'], * ], * ]); - *``` + * ``` * * @see http://api.jqueryui.com/autocomplete/ * @author Alexander Kochetov <creocoder@gmail.com> diff --git a/extensions/jui/DatePicker.php b/extensions/jui/DatePicker.php index 83a26d8..9360a22 100644 --- a/extensions/jui/DatePicker.php +++ b/extensions/jui/DatePicker.php @@ -37,7 +37,7 @@ use yii\helpers\Json; * 'dateFormat' => 'yy-mm-dd', * ], * ]); - *``` + * ``` * * @see http://api.jqueryui.com/datepicker/ * @author Alexander Kochetov <creocoder@gmail.com> diff --git a/extensions/jui/ProgressBar.php b/extensions/jui/ProgressBar.php index 5fcd558..d35fc9b 100644 --- a/extensions/jui/ProgressBar.php +++ b/extensions/jui/ProgressBar.php @@ -28,7 +28,7 @@ use yii\helpers\Html; * ~~~php * ProgressBar::begin([ * 'clientOptions' => ['value' => 75], - * ]); + * ]); * * echo '<div class="progress-label">Loading...</div>'; * diff --git a/extensions/jui/Selectable.php b/extensions/jui/Selectable.php index 6af3f58..a8302b5 100644 --- a/extensions/jui/Selectable.php +++ b/extensions/jui/Selectable.php @@ -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() diff --git a/extensions/jui/Sortable.php b/extensions/jui/Sortable.php index a87cdf6..b974d5a 100644 --- a/extensions/jui/Sortable.php +++ b/extensions/jui/Sortable.php @@ -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() diff --git a/extensions/jui/Spinner.php b/extensions/jui/Spinner.php index 1222515..2daa866 100644 --- a/extensions/jui/Spinner.php +++ b/extensions/jui/Spinner.php @@ -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> diff --git a/extensions/jui/Tabs.php b/extensions/jui/Tabs.php index 4bff01e..f6a5fb7 100644 --- a/extensions/jui/Tabs.php +++ b/extensions/jui/Tabs.php @@ -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() diff --git a/extensions/jui/Widget.php b/extensions/jui/Widget.php index ff2c8fe..af2732d 100644 --- a/extensions/jui/Widget.php +++ b/extensions/jui/Widget.php @@ -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) { diff --git a/extensions/mongodb/ActiveQuery.php b/extensions/mongodb/ActiveQuery.php index 33c58a2..6894f02 100644 --- a/extensions/mongodb/ActiveQuery.php +++ b/extensions/mongodb/ActiveQuery.php @@ -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) diff --git a/extensions/mongodb/ActiveRecord.php b/extensions/mongodb/ActiveRecord.php index d9ac254..aa29370 100644 --- a/extensions/mongodb/ActiveRecord.php +++ b/extensions/mongodb/ActiveRecord.php @@ -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) { diff --git a/extensions/mongodb/Cache.php b/extensions/mongodb/Cache.php index 4019416..a1e3c4c 100644 --- a/extensions/mongodb/Cache.php +++ b/extensions/mongodb/Cache.php @@ -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) { diff --git a/extensions/mongodb/Collection.php b/extensions/mongodb/Collection.php index d3c22b0..62e1d41 100644 --- a/extensions/mongodb/Collection.php +++ b/extensions/mongodb/Collection.php @@ -98,8 +98,8 @@ class Collection extends Object /** * Composes log/profile token. - * @param string $command command name - * @param array $arguments command arguments. + * @param string $command command name + * @param array $arguments command arguments. * @return string token. */ protected function composeLogToken($command, $arguments = []) @@ -114,7 +114,7 @@ class Collection extends Object /** * Encodes complex log data into JSON format string. - * @param mixed $data raw data. + * @param mixed $data raw data. * @return string encoded data string. */ protected function encodeLogData($data) @@ -124,7 +124,7 @@ class Collection extends Object /** * Pre-processes the log data before sending it to `json_encode()`. - * @param mixed $data raw data. + * @param mixed $data raw data. * @return mixed the processed data. */ protected function processLogData($data) @@ -173,7 +173,7 @@ class Collection extends Object /** * Drops this collection. * @throws Exception on failure. - * @return boolean whether the operation successful. + * @return boolean whether the operation successful. */ public function drop() { @@ -194,21 +194,21 @@ class Collection extends Object /** * Creates an index on the collection and the specified fields. - * @param array|string $columns column name or list of column names. - * If array is given, each element in the array has as key the field name, and as - * value either 1 for ascending sort, or -1 for descending sort. - * You can specify field using native numeric key with the field name as a value, - * in this case ascending sort will be used. - * For example: - * ~~~ - * [ - * 'name', - * 'status' => -1, - * ] - * ~~~ - * @param array $options list of options in format: optionName => optionValue. - * @throws Exception on failure. - * @return boolean whether the operation successful. + * @param array|string $columns column name or list of column names. + * If array is given, each element in the array has as key the field name, and as + * value either 1 for ascending sort, or -1 for descending sort. + * You can specify field using native numeric key with the field name as a value, + * in this case ascending sort will be used. + * For example: + * ~~~ + * [ + * 'name', + * 'status' => -1, + * ] + * ~~~ + * @param array $options list of options in format: optionName => optionValue. + * @throws Exception on failure. + * @return boolean whether the operation successful. */ public function createIndex($columns, $options = []) { @@ -234,22 +234,22 @@ class Collection extends Object /** * Drop indexes for specified column(s). - * @param string|array $columns column name or list of column names. - * If array is given, each element in the array has as key the field name, and as - * value either 1 for ascending sort, or -1 for descending sort. - * Use value 'text' to specify text index. - * You can specify field using native numeric key with the field name as a value, - * in this case ascending sort will be used. - * For example: - * ~~~ - * [ - * 'name', - * 'status' => -1, - * 'description' => 'text', - * ] - * ~~~ - * @throws Exception on failure. - * @return boolean whether the operation successful. + * @param string|array $columns column name or list of column names. + * If array is given, each element in the array has as key the field name, and as + * value either 1 for ascending sort, or -1 for descending sort. + * Use value 'text' to specify text index. + * You can specify field using native numeric key with the field name as a value, + * in this case ascending sort will be used. + * For example: + * ~~~ + * [ + * 'name', + * 'status' => -1, + * 'description' => 'text', + * ] + * ~~~ + * @throws Exception on failure. + * @return boolean whether the operation successful. */ public function dropIndex($columns) { @@ -272,7 +272,7 @@ class Collection extends Object /** * Compose index keys from given columns/keys list. - * @param array $columns raw columns/keys list. + * @param array $columns raw columns/keys list. * @return array normalizes index keys array. */ protected function normalizeIndexKeys($columns) @@ -292,7 +292,7 @@ class Collection extends Object /** * Drops all indexes for this collection. * @throws Exception on failure. - * @return integer count of dropped indexes. + * @return integer count of dropped indexes. */ public function dropAllIndexes() { @@ -312,8 +312,8 @@ class Collection extends Object /** * Returns a cursor for the search results. * In order to perform "find" queries use [[Query]] class. - * @param array $condition query condition - * @param array $fields fields to be selected + * @param array $condition query condition + * @param array $fields fields to be selected * @return \MongoCursor cursor for the search results * @see Query */ @@ -324,8 +324,8 @@ class Collection extends Object /** * Returns a single document. - * @param array $condition query condition - * @param array $fields fields to be selected + * @param array $condition query condition + * @param array $fields fields to be selected * @return array|null the single document. Null is returned if the query results in nothing. * @see http://www.php.net/manual/en/mongocollection.findone.php */ @@ -336,12 +336,12 @@ class Collection extends Object /** * Updates a document and returns it. - * @param array $condition query condition - * @param array $update update criteria - * @param array $fields fields to be returned - * @param array $options list of options in format: optionName => optionValue. + * @param array $condition query condition + * @param array $update update criteria + * @param array $fields fields to be returned + * @param array $options list of options in format: optionName => optionValue. * @return array|null the original document, or the modified document when $options['new'] is set. - * @throws Exception on failure. + * @throws Exception on failure. * @see http://www.php.net/manual/en/mongocollection.findandmodify.php */ public function findAndModify($condition, $update, $fields = [], $options = []) @@ -363,10 +363,10 @@ class Collection extends Object /** * Inserts new data into collection. - * @param array|object $data data to be inserted. - * @param array $options list of options in format: optionName => optionValue. - * @return \MongoId new record id instance. - * @throws Exception on failure. + * @param array|object $data data to be inserted. + * @param array $options list of options in format: optionName => optionValue. + * @return \MongoId new record id instance. + * @throws Exception on failure. */ public function insert($data, $options = []) { @@ -387,9 +387,9 @@ class Collection extends Object /** * Inserts several new rows into collection. - * @param array $rows array of arrays or objects to be inserted. - * @param array $options list of options in format: optionName => optionValue. - * @return array inserted data, each row will have "_id" key assigned to it. + * @param array $rows array of arrays or objects to be inserted. + * @param array $options list of options in format: optionName => optionValue. + * @return array inserted data, each row will have "_id" key assigned to it. * @throws Exception on failure. */ public function batchInsert($rows, $options = []) @@ -413,11 +413,11 @@ class Collection extends Object * Updates the rows, which matches given criteria by given data. * Note: for "multiple" mode Mongo requires explicit strategy "$set" or "$inc" * to be specified for the "newData". If no strategy is passed "$set" will be used. - * @param array $condition description of the objects to update. - * @param array $newData the object with which to update the matching records. - * @param array $options list of options in format: optionName => optionValue. + * @param array $condition description of the objects to update. + * @param array $newData the object with which to update the matching records. + * @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 update($condition, $newData, $options = []) { @@ -449,10 +449,10 @@ class Collection extends Object /** * Update the existing database data, otherwise insert this data - * @param array|object $data data to be updated/inserted. - * @param array $options list of options in format: optionName => optionValue. - * @return \MongoId updated/new record id instance. - * @throws Exception on failure. + * @param array|object $data data to be updated/inserted. + * @param array $options list of options in format: optionName => optionValue. + * @return \MongoId updated/new record id instance. + * @throws Exception on failure. */ public function save($data, $options = []) { @@ -473,10 +473,10 @@ class Collection extends Object /** * 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. * @see http://www.php.net/manual/en/mongocollection.remove.php */ public function remove($condition = [], $options = []) @@ -503,10 +503,10 @@ class Collection extends Object /** * Returns a list of distinct values for the given column across a collection. - * @param string $column column to use. - * @param array $condition query parameters. + * @param string $column column to use. + * @param array $condition query parameters. * @return array|boolean array of distinct values, or "false" on failure. - * @throws Exception on failure. + * @throws Exception on failure. */ public function distinct($column, $condition = []) { @@ -527,10 +527,10 @@ class Collection extends Object /** * Performs aggregation using Mongo Aggregation Framework. - * @param array $pipeline list of pipeline operators, or just the first operator - * @param array $pipelineOperator additional pipeline operator. You can specify additional - * pipelines via third argument, fourth argument etc. - * @return array the result of the aggregation. + * @param array $pipeline list of pipeline operators, or just the first operator + * @param array $pipelineOperator additional pipeline operator. You can specify additional + * pipelines via third argument, fourth argument etc. + * @return array the result of the aggregation. * @throws Exception on failure. * @see http://docs.mongodb.org/manual/applications/aggregation/ */ @@ -554,18 +554,18 @@ class Collection extends Object /** * Performs aggregation using Mongo "group" command. - * @param mixed $keys fields to group by. If an array or non-code object is passed, - * it will be the key used to group results. If instance of [[\MongoCode]] passed, - * it will be treated as a function that returns the key to group by. - * @param array $initial Initial value of the aggregation counter object. - * @param \MongoCode|string $reduce function that takes two arguments (the current - * document and the aggregation to this point) and does the aggregation. - * Argument will be automatically cast to [[\MongoCode]]. - * @param array $options optional parameters to the group command. Valid options include: - * - condition - criteria for including a document in the aggregation. - * - finalize - function called once per unique key that takes the final output of the reduce function. - * @return array the result of the aggregation. - * @throws Exception on failure. + * @param mixed $keys fields to group by. If an array or non-code object is passed, + * it will be the key used to group results. If instance of [[\MongoCode]] passed, + * it will be treated as a function that returns the key to group by. + * @param array $initial Initial value of the aggregation counter object. + * @param \MongoCode|string $reduce function that takes two arguments (the current + * document and the aggregation to this point) and does the aggregation. + * Argument will be automatically cast to [[\MongoCode]]. + * @param array $options optional parameters to the group command. Valid options include: + * - condition - criteria for including a document in the aggregation. + * - finalize - function called once per unique key that takes the final output of the reduce function. + * @return array the result of the aggregation. + * @throws Exception on failure. * @see http://docs.mongodb.org/manual/reference/command/group/ */ public function group($keys, $initial, $reduce, $options = []) @@ -623,24 +623,24 @@ class Collection extends Object * $results = $query->from($resultCollectionName)->all(); * ~~~ * - * @param \MongoCode|string $map function, which emits map data from collection. - * Argument will be automatically cast to [[\MongoCode]]. - * @param \MongoCode|string $reduce function that takes two arguments (the map key - * and the map values) and does the aggregation. - * Argument will be automatically cast to [[\MongoCode]]. - * @param string|array $out output collection name. It could be a string for simple output - * ('outputCollection'), or an array for parametrized output (['merge' => 'outputCollection']). - * You can pass ['inline' => true] to fetch the result at once without temporary collection usage. - * @param array $condition criteria for including a document in the aggregation. - * @param array $options additional optional parameters to the mapReduce command. Valid options include: - * - sort - array - key to sort the input documents. The sort key must be in an existing index for this collection. - * - limit - the maximum number of documents to return in the collection. - * - finalize - function, which follows the reduce method and modifies the output. - * - scope - array - specifies global variables that are accessible in the map, reduce and finalize functions. - * - jsMode - boolean -Specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions. - * - verbose - boolean - specifies whether to include the timing information in the result information. - * @return string|array the map reduce output collection name or output results. - * @throws Exception on failure. + * @param \MongoCode|string $map function, which emits map data from collection. + * Argument will be automatically cast to [[\MongoCode]]. + * @param \MongoCode|string $reduce function that takes two arguments (the map key + * and the map values) and does the aggregation. + * Argument will be automatically cast to [[\MongoCode]]. + * @param string|array $out output collection name. It could be a string for simple output + * ('outputCollection'), or an array for parametrized output (['merge' => 'outputCollection']). + * You can pass ['inline' => true] to fetch the result at once without temporary collection usage. + * @param array $condition criteria for including a document in the aggregation. + * @param array $options additional optional parameters to the mapReduce command. Valid options include: + * - sort - array - key to sort the input documents. The sort key must be in an existing index for this collection. + * - limit - the maximum number of documents to return in the collection. + * - finalize - function, which follows the reduce method and modifies the output. + * - scope - array - specifies global variables that are accessible in the map, reduce and finalize functions. + * - jsMode - boolean -Specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions. + * - verbose - boolean - specifies whether to include the timing information in the result information. + * @return string|array the map reduce output collection name or output results. + * @throws Exception on failure. */ public function mapReduce($map, $reduce, $out, $condition = [], $options = []) { @@ -685,15 +685,15 @@ class Collection extends Object /** * Performs full text search. - * @param string $search string of terms that MongoDB parses and uses to query the text index. - * @param array $condition criteria for filtering a results list. - * @param array $fields list of fields to be returned in result. - * @param array $options additional optional parameters to the mapReduce command. Valid options include: - * - limit - the maximum number of documents to include in the response (by default 100). - * - language - the language that determines the list of stop words for the search - * and the rules for the stemmer and tokenizer. If not specified, the search uses the default - * language of the index. - * @return array the highest scoring documents, in descending order by score. + * @param string $search string of terms that MongoDB parses and uses to query the text index. + * @param array $condition criteria for filtering a results list. + * @param array $fields list of fields to be returned in result. + * @param array $options additional optional parameters to the mapReduce command. Valid options include: + * - limit - the maximum number of documents to include in the response (by default 100). + * - language - the language that determines the list of stop words for the search + * and the rules for the stemmer and tokenizer. If not specified, the search uses the default + * language of the index. + * @return array the highest scoring documents, in descending order by score. * @throws Exception on failure. */ public function fullTextSearch($search, $condition = [], $fields = [], $options = []) @@ -728,7 +728,7 @@ class Collection 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) @@ -765,7 +765,7 @@ class Collection extends Object /** * Converts "\yii\db\*" quick condition keyword into actual Mongo condition keyword. - * @param string $key raw condition key. + * @param string $key raw condition key. * @return string actual key. */ protected function normalizeConditionKeyword($key) @@ -787,7 +787,7 @@ class Collection extends Object /** * Converts given value into [[MongoId]] instance. * If array given, each element of it will be processed. - * @param mixed $rawId raw id(s). + * @param mixed $rawId raw id(s). * @return array|\MongoId normalized id(s). */ protected function ensureMongoId($rawId) @@ -818,9 +818,9 @@ class Collection extends Object /** * Parses the condition specification and generates the corresponding Mongo condition. - * @param array $condition the condition specification. Please refer to [[Query::where()]] - * on how to specify a condition. - * @return array the generated Mongo condition + * @param array $condition the condition specification. Please refer to [[Query::where()]] + * on how to specify a condition. + * @return array the generated Mongo condition * @throws InvalidParamException if the condition is in bad format */ public function buildCondition($condition) @@ -858,7 +858,7 @@ class Collection extends Object /** * Creates a condition based on column-value pairs. - * @param array $condition the condition specification. + * @param array $condition the condition specification. * @return array the generated Mongo condition. */ public function buildHashCondition($condition) @@ -892,9 +892,9 @@ class Collection extends Object /** * Connects two or more conditions with the `AND` operator. - * @param string $operator the operator to use for connecting the given operands - * @param array $operands the Mongo conditions to connect. - * @return array the generated Mongo condition. + * @param string $operator the operator to use for connecting the given operands + * @param array $operands the Mongo conditions to connect. + * @return array the generated Mongo condition. */ public function buildAndCondition($operator, $operands) { @@ -909,9 +909,9 @@ class Collection extends Object /** * Connects two or more conditions with the `OR` operator. - * @param string $operator the operator to use for connecting the given operands - * @param array $operands the Mongo conditions to connect. - * @return array the generated Mongo condition. + * @param string $operator the operator to use for connecting the given operands + * @param array $operands the Mongo conditions to connect. + * @return array the generated Mongo condition. */ public function buildOrCondition($operator, $operands) { @@ -926,10 +926,10 @@ class Collection extends Object /** * Creates an Mongo condition, which emulates the `BETWEEN` operator. - * @param string $operator the operator to use - * @param array $operands the first operand is the column name. The second and third operands - * describe the interval that column value should be in. - * @return array the generated Mongo condition. + * @param string $operator the operator to use + * @param array $operands the first operand is the column name. The second and third operands + * describe the interval that column value should be in. + * @return array the generated Mongo condition. * @throws InvalidParamException if wrong number of operands have been given. */ public function buildBetweenCondition($operator, $operands) @@ -957,11 +957,11 @@ class Collection extends Object /** * Creates an Mongo condition with the `IN` operator. - * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) - * @param array $operands the first operand is the column name. If it is an array - * a composite IN condition will be generated. - * The second operand is an array of values that column value should be among. - * @return array the generated Mongo condition. + * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) + * @param array $operands the first operand is the column name. If it is an array + * a composite IN condition will be generated. + * The second operand is an array of values that column value should be among. + * @return array the generated Mongo condition. * @throws InvalidParamException if wrong number of operands have been given. */ public function buildInCondition($operator, $operands) @@ -1000,10 +1000,10 @@ class Collection extends Object /** * Creates a Mongo condition, which emulates the `LIKE` operator. - * @param string $operator the operator to use - * @param array $operands the first operand is the column name. - * The second operand is a single value that column value should be compared with. - * @return array the generated Mongo condition. + * @param string $operator the operator to use + * @param array $operands the first operand is the column name. + * The second operand is a single value that column value should be compared with. + * @return array the generated Mongo condition. * @throws InvalidParamException if wrong number of operands have been given. */ public function buildLikeCondition($operator, $operands) diff --git a/extensions/mongodb/Connection.php b/extensions/mongodb/Connection.php index 4d1aef9..fab3e88 100644 --- a/extensions/mongodb/Connection.php +++ b/extensions/mongodb/Connection.php @@ -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) diff --git a/extensions/mongodb/Database.php b/extensions/mongodb/Database.php index a560dbf..3027349 100644 --- a/extensions/mongodb/Database.php +++ b/extensions/mongodb/Database.php @@ -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) diff --git a/extensions/mongodb/Query.php b/extensions/mongodb/Query.php index 86bec38..8a5681b 100644 --- a/extensions/mongodb/Query.php +++ b/extensions/mongodb/Query.php @@ -47,7 +47,7 @@ class Query extends Component implements QueryInterface */ public $select = []; /** - * @var string|array the collection to be selected from. If string considered as the name of the collection + * @var string|array the collection to be selected from. 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 * @see from() @@ -56,7 +56,7 @@ class Query extends Component implements QueryInterface /** * 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) @@ -70,7 +70,7 @@ class Query extends Component implements QueryInterface /** * Sets the list of fields of the results to return. - * @param array $fields fields of the results to return. + * @param array $fields fields of the results to return. * @return static the query object itself. */ public function select(array $fields) @@ -82,7 +82,7 @@ class Query extends Component implements QueryInterface /** * Sets the collection to be selected from. - * @param string|array the collection to be selected from. If string considered as the name of the collection + * @param string|array the collection to be selected from. 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 * @return static the query object itself. @@ -96,7 +96,7 @@ class Query extends Component implements QueryInterface /** * Builds the Mongo cursor for this query. - * @param Connection $db the database connection used to execute the query. + * @param Connection $db the database connection used to execute the query. * @return \MongoCursor mongo cursor instance. */ protected function buildCursor($db = null) @@ -128,12 +128,12 @@ class Query extends Component implements QueryInterface /** * Fetches rows from the given Mongo cursor. - * @param \MongoCursor $cursor Mongo cursor instance to fetch data from. - * @param boolean $all whether to fetch all rows or only first one. - * @param string|callable $indexBy the column name or PHP callback, - * by which the query results should be indexed by. - * @throws Exception on failure. - * @return array|boolean result. + * @param \MongoCursor $cursor Mongo cursor instance to fetch data from. + * @param boolean $all whether to fetch all rows or only first one. + * @param string|callable $indexBy the column name or PHP callback, + * by which the query results should be indexed by. + * @throws Exception on failure. + * @return array|boolean result. */ protected function fetchRows($cursor, $all = true, $indexBy = null) { @@ -152,10 +152,10 @@ class Query extends Component implements QueryInterface } /** - * @param \MongoCursor $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 \MongoCursor $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) @@ -187,9 +187,9 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns all results as an array. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component 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 this parameter is not given, the `mongodb` application component 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) { @@ -200,10 +200,10 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns a single row of result. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. * @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query - * results in nothing. + * results in nothing. */ public function one($db = null) { @@ -214,11 +214,11 @@ class Query extends Component implements QueryInterface /** * Returns the number of records. - * @param string $q kept to match [[QueryInterface]], its value is ignored. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return integer number of records - * @throws Exception on failure. + * @param string $q kept to match [[QueryInterface]], its value is ignored. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return integer number of records + * @throws Exception on failure. */ public function count($q = '*', $db = null) { @@ -239,9 +239,9 @@ class Query extends Component implements QueryInterface /** * Returns a value indicating whether the query result contains any row of data. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return boolean whether the query result contains any row of data. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return boolean whether the query result contains any row of data. */ public function exists($db = null) { @@ -250,11 +250,11 @@ class Query extends Component implements QueryInterface /** * Returns the sum of the specified column values. - * @param string $q the column name. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return integer the sum of the specified column values + * @param string $q the column name. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return integer the sum of the specified column values */ public function sum($q, $db = null) { @@ -263,11 +263,11 @@ class Query extends Component implements QueryInterface /** * Returns the average of the specified column values. - * @param string $q the column name. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return integer the average of the specified column values. + * @param string $q the column name. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return integer the average of the specified column values. */ public function average($q, $db = null) { @@ -276,11 +276,11 @@ class Query extends Component implements QueryInterface /** * Returns the minimum of the specified column values. - * @param string $q the column name. - * Make sure you properly quote column names in the expression. - * @param Connection $db the database connection used to generate the SQL statement. - * If this parameter is not given, the `db` application component will be used. - * @return integer the minimum of the specified column values. + * @param string $q the column name. + * Make sure you properly quote column names in the expression. + * @param Connection $db the database connection used to generate the SQL statement. + * If this parameter is not given, the `db` application component will be used. + * @return integer the minimum of the specified column values. */ public function min($q, $db = null) { @@ -289,11 +289,11 @@ class Query extends Component implements QueryInterface /** * Returns the maximum of the specified column values. - * @param string $q the column name. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return integer the maximum of the specified column values. + * @param string $q the column name. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return integer the maximum of the specified column values. */ public function max($q, $db = null) { @@ -302,10 +302,10 @@ class Query extends Component implements QueryInterface /** * Performs the aggregation for the given column. - * @param string $column column name. - * @param string $operator aggregation operator. - * @param Connection $db the database connection used to execute the query. - * @return integer aggregation result. + * @param string $column column name. + * @param string $operator aggregation operator. + * @param Connection $db the database connection used to execute the query. + * @return integer aggregation result. */ protected function aggregate($column, $operator, $db) { @@ -332,10 +332,10 @@ class Query extends Component implements QueryInterface /** * Returns a list of distinct values for the given column across a collection. - * @param string $q column to use. - * @param Connection $db the Mongo connection used to execute the query. - * If this parameter is not given, the `mongodb` application component will be used. - * @return array array of distinct values + * @param string $q column to use. + * @param Connection $db the Mongo connection used to execute the query. + * If this parameter is not given, the `mongodb` application component will be used. + * @return array array of distinct values */ public function distinct($q, $db = null) { diff --git a/extensions/mongodb/Session.php b/extensions/mongodb/Session.php index 02f456a..ece5bcd 100644 --- a/extensions/mongodb/Session.php +++ b/extensions/mongodb/Session.php @@ -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) diff --git a/extensions/mongodb/file/ActiveQuery.php b/extensions/mongodb/file/ActiveQuery.php index ce68452..da53623 100644 --- a/extensions/mongodb/file/ActiveQuery.php +++ b/extensions/mongodb/file/ActiveQuery.php @@ -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) { diff --git a/extensions/mongodb/file/ActiveRecord.php b/extensions/mongodb/file/ActiveRecord.php index bcab138..dc700d1 100644 --- a/extensions/mongodb/file/ActiveRecord.php +++ b/extensions/mongodb/file/ActiveRecord.php @@ -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() diff --git a/extensions/mongodb/file/Collection.php b/extensions/mongodb/file/Collection.php index 4ecc4c5..d0d609f 100644 --- a/extensions/mongodb/file/Collection.php +++ b/extensions/mongodb/file/Collection.php @@ -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) diff --git a/extensions/mongodb/file/Query.php b/extensions/mongodb/file/Query.php index b4bb937..0f67a17 100644 --- a/extensions/mongodb/file/Query.php +++ b/extensions/mongodb/file/Query.php @@ -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) diff --git a/extensions/redis/ActiveQuery.php b/extensions/redis/ActiveQuery.php index 3a98341..adf947e 100644 --- a/extensions/redis/ActiveQuery.php +++ b/extensions/redis/ActiveQuery.php @@ -91,8 +91,8 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Executes the query and returns all results as an array. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) @@ -127,11 +127,11 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Executes the query and returns a single row of result. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component 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) { @@ -167,10 +167,10 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the number of records. - * @param string $q the COUNT expression. This parameter is ignored by this implementation. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return integer number of records + * @param string $q the COUNT expression. This parameter is ignored by this implementation. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return integer number of records */ public function count($q = '*', $db = null) { @@ -189,9 +189,9 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns a value indicating whether the query result contains any row of data. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return boolean whether the query result contains any row of data. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return boolean whether the query result contains any row of data. */ public function exists($db = null) { @@ -200,10 +200,10 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Executes the query and returns the first column of the result. - * @param string $column name of the column to select - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return array the first column of the query result. An empty array is returned if the query results in nothing. + * @param string $column name of the column to select + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return array the first column of the query result. An empty array is returned if the query results in nothing. */ public function column($column, $db = null) { @@ -213,10 +213,10 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the number of records. - * @param string $column the column to sum up - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return integer number of records + * @param string $column the column to sum up + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return integer number of records */ public function sum($column, $db = null) { @@ -225,11 +225,11 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the average of the specified column values. - * @param string $column the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return integer the average of the specified column values. + * @param string $column the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return integer the average of the specified column values. */ public function average($column, $db = null) { @@ -238,11 +238,11 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the minimum of the specified column values. - * @param string $column the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return integer the minimum of the specified column values. + * @param string $column the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return integer the minimum of the specified column values. */ public function min($column, $db = null) { @@ -251,11 +251,11 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the maximum of the specified column values. - * @param string $column the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return integer the maximum of the specified column values. + * @param string $column the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return integer the maximum of the specified column values. */ public function max($column, $db = null) { @@ -265,11 +265,11 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Returns the query result as a scalar value. * The value returned will be the specified attribute in the first record of the query results. - * @param string $attribute name of the attribute to select - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @return string the value of the specified attribute in the first record of the query result. - * Null is returned if the query result is empty. + * @param string $attribute name of the attribute to select + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @return string the value of the specified attribute in the first record of the query result. + * Null is returned if the query result is empty. */ public function scalar($attribute, $db = null) { @@ -283,10 +283,10 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Executes a script created by [[LuaScriptBuilder]] - * @param Connection|null $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @param string $type the type of the script to generate - * @param string $columnName + * @param Connection|null $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @param string $type the type of the script to generate + * @param string $columnName * @return array|bool|null|string */ protected function executeScript($db, $type, $columnName = null) @@ -339,10 +339,10 @@ class ActiveQuery extends Component implements ActiveQueryInterface /** * Fetch by pk if possible as this is much faster - * @param Connection $db the database connection used to execute the query. - * If this parameter is not given, the `db` application component will be used. - * @param string $type the type of the script to generate - * @param string $columnName + * @param Connection $db the database connection used to execute the query. + * If this parameter is not given, the `db` application component will be used. + * @param string $type the type of the script to generate + * @param string $columnName * @return array|bool|null|string * @throws \yii\base\InvalidParamException * @throws \yii\base\NotSupportedException diff --git a/extensions/redis/ActiveRecord.php b/extensions/redis/ActiveRecord.php index 6fcfb6d..2913f86 100644 --- a/extensions/redis/ActiveRecord.php +++ b/extensions/redis/ActiveRecord.php @@ -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) diff --git a/extensions/redis/Cache.php b/extensions/redis/Cache.php index a4edec4..5b880b3 100644 --- a/extensions/redis/Cache.php +++ b/extensions/redis/Cache.php @@ -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) diff --git a/extensions/redis/Connection.php b/extensions/redis/Connection.php index 0622262..9d6096b 100644 --- a/extensions/redis/Connection.php +++ b/extensions/redis/Connection.php @@ -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" diff --git a/extensions/redis/LuaScriptBuilder.php b/extensions/redis/LuaScriptBuilder.php index 0ad0e0d..c44608f 100644 --- a/extensions/redis/LuaScriptBuilder.php +++ b/extensions/redis/LuaScriptBuilder.php @@ -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) diff --git a/extensions/redis/Session.php b/extensions/redis/Session.php index 29241bd..70a74b7 100644 --- a/extensions/redis/Session.php +++ b/extensions/redis/Session.php @@ -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) diff --git a/extensions/smarty/ViewRenderer.php b/extensions/smarty/ViewRenderer.php index b54171c..b41d937 100644 --- a/extensions/smarty/ViewRenderer.php +++ b/extensions/smarty/ViewRenderer.php @@ -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 */ diff --git a/extensions/sphinx/ActiveQuery.php b/extensions/sphinx/ActiveQuery.php index 42911d3..33cbf83 100644 --- a/extensions/sphinx/ActiveQuery.php +++ b/extensions/sphinx/ActiveQuery.php @@ -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) { diff --git a/extensions/sphinx/ActiveRecord.php b/extensions/sphinx/ActiveRecord.php index 6c698af..5f1ab27 100644 --- a/extensions/sphinx/ActiveRecord.php +++ b/extensions/sphinx/ActiveRecord.php @@ -79,8 +79,8 @@ abstract class ActiveRecord extends BaseActiveRecord * $customers = Article::findBySql("SELECT * FROM `idx_article` WHERE MATCH('development')")->all(); * ~~~ * - * @param string $sql the SQL statement to be executed - * @param array $params parameters to be bound to the SQL statement during execution. + * @param string $sql the SQL statement to be executed + * @param array $params parameters to be bound to the SQL statement during execution. * @return ActiveQuery the newly created [[ActiveQuery]] instance */ public static function findBySql($sql, $params = []) @@ -99,11 +99,11 @@ abstract class ActiveRecord extends BaseActiveRecord * Article::updateAll(['status' => 1], 'status = 2'); * ~~~ * - * @param array $attributes attribute values (name-value pairs) to be saved into the table - * @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. - * @param array $params the parameters (name => value) to be bound to the query. - * @return integer the number of rows updated + * @param array $attributes attribute values (name-value pairs) to be saved into the table + * @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. + * @param array $params the parameters (name => value) to be bound to the query. + * @return integer the number of rows updated */ public static function updateAll($attributes, $condition = '', $params = []) { @@ -122,10 +122,10 @@ abstract class ActiveRecord extends BaseActiveRecord * Article::deleteAll('status = 3'); * ~~~ * - * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL. - * Please refer to [[Query::where()]] on how to specify this parameter. - * @param array $params the parameters (name => value) to be bound to the query. - * @return integer the number of rows deleted + * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL. + * Please refer to [[Query::where()]] on how to specify this parameter. + * @param array $params the parameters (name => value) to be bound to the query. + * @return integer the number of rows deleted */ public static function deleteAll($condition = '', $params = []) { @@ -157,7 +157,7 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Returns the schema information of the Sphinx index associated with this AR class. - * @return IndexSchema the schema information of the Sphinx index associated with this AR class. + * @return IndexSchema the schema information of the Sphinx index associated with this AR class. * @throws InvalidConfigException if the index for the AR class does not exist. */ public static function getIndexSchema() @@ -186,12 +186,12 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Builds a snippet from provided data and query, using specified index 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 + * @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 string|array built snippet in case "source" is a string, list of built snippets - * in case "source" is an array. + * in case "source" is an array. */ public static function callSnippets($source, $match, $options = []) { @@ -206,9 +206,9 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Returns tokenized and normalized forms of the keywords, and, optionally, keyword statistics. - * @param string $text the text to break down to keywords. - * @param boolean $fetchStatistic whether to return document and hit occurrence statistics - * @return array keywords and statistics + * @param string $text the text to break down to keywords. + * @param boolean $fetchStatistic whether to return document and hit occurrence statistics + * @return array keywords and statistics */ public static function callKeywords($text, $fetchStatistic = false) { @@ -228,8 +228,8 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Returns current snippet value or generates new one from given match. - * @param string $match snippet source query - * @param array $options list of options in format: optionName => optionValue + * @param string $match snippet source query + * @param array $options list of options in format: optionName => optionValue * @return string snippet value */ public function getSnippet($match = null, $options = []) @@ -243,8 +243,8 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Builds up the snippet value from the given query. - * @param string $match the full-text query to build snippets for. - * @param array $options list of options in format: optionName => optionValue + * @param string $match the full-text query to build snippets for. + * @param array $options list of options in format: optionName => optionValue * @return string snippet value. */ protected function fetchSnippet($match, $options = []) @@ -263,7 +263,7 @@ abstract class ActiveRecord extends BaseActiveRecord * return $this->snippetSourceRelation->content; * } * ~~~ - * @return string snippet source string. + * @return string snippet source string. * @throws \yii\base\NotSupportedException if this is not supported by the Active Record class */ public function getSnippetSource() @@ -296,7 +296,7 @@ abstract class ActiveRecord extends BaseActiveRecord * in a transaction. * * @return array the declarations of transactional operations. The array keys are scenarios names, - * and the array values are the corresponding transaction operations. + * and the array values are the corresponding transaction operations. */ public function transactions() { @@ -342,11 +342,11 @@ abstract class ActiveRecord extends BaseActiveRecord * $article->insert(); * ~~~ * - * @param boolean $runValidation whether to perform validation before saving the record. - * If the validation fails, the record will not be inserted. - * @param array $attributes list of attributes that need to be saved. Defaults to null, - * meaning all attributes that are loaded from index 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. + * @param array $attributes list of attributes that need to be saved. Defaults to null, + * meaning all attributes that are loaded from index 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) @@ -441,15 +441,15 @@ abstract 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 $attributeNames list of attributes that need to be saved. Defaults to null, - * meaning all attributes that are loaded from DB will be saved. - * @return integer|boolean the number of rows affected, or false if validation fails - * or [[beforeSave()]] stops the updating process. + * @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 $attributeNames list of attributes that need to be saved. Defaults to null, + * meaning all attributes that are loaded from DB will be saved. + * @return integer|boolean the number of rows affected, or false if validation fails + * or [[beforeSave()]] stops the updating process. * @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data - * being updated is outdated. - * @throws \Exception in case update failed. + * being updated is outdated. + * @throws \Exception in case update failed. */ public function update($runValidation = true, $attributeNames = null) { @@ -551,11 +551,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 rows deleted, or false if the deletion is unsuccessful for some reason. - * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful. + * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason. + * Note that it is possible the number of rows 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() { @@ -599,8 +599,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 index 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 index. + * @param ActiveRecord $record record to compare to + * @return boolean whether the two active records refer to the same row in the same index. */ public function equals($record) { @@ -627,7 +627,7 @@ abstract class ActiveRecord extends BaseActiveRecord /** * Returns a value indicating whether the specified operation is transactional in the current [[scenario]]. - * @param integer $operation the operation to check. Possible values are [[OP_INSERT]], [[OP_UPDATE]] and [[OP_DELETE]]. + * @param integer $operation the operation to check. Possible values are [[OP_INSERT]], [[OP_UPDATE]] and [[OP_DELETE]]. * @return boolean whether the specified operation is transactional in the current [[scenario]]. */ public function isTransactional($operation) diff --git a/extensions/sphinx/ColumnSchema.php b/extensions/sphinx/ColumnSchema.php index 76c66e1..a30c198 100644 --- a/extensions/sphinx/ColumnSchema.php +++ b/extensions/sphinx/ColumnSchema.php @@ -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) diff --git a/extensions/sphinx/Command.php b/extensions/sphinx/Command.php index 5306acc..2cd680e 100644 --- a/extensions/sphinx/Command.php +++ b/extensions/sphinx/Command.php @@ -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) { diff --git a/extensions/sphinx/Connection.php b/extensions/sphinx/Connection.php index 3548270..22309f8 100644 --- a/extensions/sphinx/Connection.php +++ b/extensions/sphinx/Connection.php @@ -69,8 +69,8 @@ class Connection extends \yii\db\Connection /** * Obtains the schema information for the named index. - * @param string $name index name. - * @param boolean $refresh whether to reload the table schema even if it is found in the cache. + * @param string $name index name. + * @param boolean $refresh whether to reload the table schema even if it is found in the cache. * @return IndexSchema index schema information. Null if the named index does not exist. */ public function getIndexSchema($name, $refresh = false) @@ -83,7 +83,7 @@ class Connection extends \yii\db\Connection * If the index name contains schema prefix, the prefix will also be properly quoted. * If the index name is already quoted or contains special characters including '(', '[[' and '{{', * then this method will do nothing. - * @param string $name index name + * @param string $name index name * @return string the properly quoted index name */ public function quoteIndexName($name) @@ -93,7 +93,7 @@ class Connection extends \yii\db\Connection /** * Alias of [[quoteIndexName()]]. - * @param string $name table name + * @param string $name table name * @return string the properly quoted table name */ public function quoteTableName($name) @@ -103,8 +103,8 @@ class Connection extends \yii\db\Connection /** * Creates a command for execution. - * @param string $sql the SQL statement to be executed - * @param array $params the parameters to be bound to the SQL statement + * @param string $sql the SQL statement to be executed + * @param array $params the parameters to be bound to the SQL statement * @return Command the Sphinx command */ public function createCommand($sql = null, $params = []) @@ -120,8 +120,8 @@ class Connection extends \yii\db\Connection /** * This method is not supported by Sphinx. - * @param string $sequenceName name of the sequence object - * @return string the row ID of the last row inserted, or the last value retrieved from the sequence object + * @param string $sequenceName name of the sequence object + * @return string the row ID of the last row inserted, or the last value retrieved from the sequence object * @throws \yii\base\NotSupportedException always. */ public function getLastInsertID($sequenceName = '') diff --git a/extensions/sphinx/IndexSchema.php b/extensions/sphinx/IndexSchema.php index e0f9024..3ce18a6 100644 --- a/extensions/sphinx/IndexSchema.php +++ b/extensions/sphinx/IndexSchema.php @@ -43,7 +43,7 @@ class IndexSchema extends Object /** * Gets the named column metadata. * This is a convenient method for retrieving a named column even if it does not exist. - * @param string $name column name + * @param string $name column name * @return ColumnSchema metadata of the named column. Null if the named column does not exist. */ public function getColumn($name) diff --git a/extensions/sphinx/Query.php b/extensions/sphinx/Query.php index 35780af..1779ed3 100644 --- a/extensions/sphinx/Query.php +++ b/extensions/sphinx/Query.php @@ -128,8 +128,8 @@ class Query extends Component implements QueryInterface private $_connection; /** - * @param Connection $connection Sphinx connection instance - * @return static the query object itself + * @param Connection $connection Sphinx connection instance + * @return static the query object itself */ public function setConnection($connection) { @@ -160,9 +160,9 @@ class Query extends Component implements QueryInterface /** * Creates a Sphinx command that can be used to execute this query. - * @param Connection $connection the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return Command the created Sphinx command instance. + * @param Connection $connection the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return Command the created Sphinx command instance. */ public function createCommand($connection = null) { @@ -175,9 +175,9 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns all results as an array. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return array the query results. If the query results in nothing, an empty array will be returned. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component 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) { @@ -201,10 +201,10 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns a single row of result. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. * @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query - * results in nothing. + * results in nothing. */ public function one($db = null) { @@ -219,10 +219,10 @@ class Query extends Component implements QueryInterface /** * Returns the query result as a scalar value. * The value returned will be the first column in the first row of the query results. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. * @return string|boolean the value of the first column in the first row of the query result. - * False is returned if the query result is empty. + * False is returned if the query result is empty. */ public function scalar($db = null) { @@ -231,9 +231,9 @@ class Query extends Component implements QueryInterface /** * Executes the query and returns the first column of the result. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return array the first column of the query result. An empty array is returned if the query results in nothing. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return array the first column of the query result. An empty array is returned if the query results in nothing. */ public function column($db = null) { @@ -242,11 +242,11 @@ class Query extends Component implements QueryInterface /** * Returns the number of records. - * @param string $q the COUNT expression. Defaults to '*'. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return integer number of records + * @param string $q the COUNT expression. Defaults to '*'. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return integer number of records */ public function count($q = '*', $db = null) { @@ -257,11 +257,11 @@ class Query extends Component implements QueryInterface /** * Returns the sum of the specified column values. - * @param string $q the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return integer the sum of the specified column values + * @param string $q the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return integer the sum of the specified column values */ public function sum($q, $db = null) { @@ -272,11 +272,11 @@ class Query extends Component implements QueryInterface /** * Returns the average of the specified column values. - * @param string $q the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return integer the average of the specified column values. + * @param string $q the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return integer the average of the specified column values. */ public function average($q, $db = null) { @@ -287,11 +287,11 @@ class Query extends Component implements QueryInterface /** * Returns the minimum of the specified column values. - * @param string $q the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return integer the minimum of the specified column values. + * @param string $q the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return integer the minimum of the specified column values. */ public function min($q, $db = null) { @@ -302,11 +302,11 @@ class Query extends Component implements QueryInterface /** * Returns the maximum of the specified column values. - * @param string $q the column name or expression. - * Make sure you properly quote column names in the expression. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return integer the maximum of the specified column values. + * @param string $q the column name or expression. + * Make sure you properly quote column names in the expression. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return integer the maximum of the specified column values. */ public function max($q, $db = null) { @@ -317,9 +317,9 @@ class Query extends Component implements QueryInterface /** * Returns a value indicating whether the query result contains any row of data. - * @param Connection $db the Sphinx connection used to generate the SQL statement. - * If this parameter is not given, the `sphinx` application component will be used. - * @return boolean whether the query result contains any row of data. + * @param Connection $db the Sphinx connection used to generate the SQL statement. + * If this parameter is not given, the `sphinx` application component will be used. + * @return boolean whether the query result contains any row of data. */ public function exists($db = null) { @@ -330,12 +330,12 @@ class Query extends Component implements QueryInterface /** * Sets the SELECT part of the query. - * @param string|array $columns the columns to be selected. - * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). - * The method will automatically quote the column names unless a column contains some parenthesis - * (which means the column contains a Sphinx expression). - * @param string $option additional option that should be appended to the 'SELECT' keyword. - * @return static the query object itself + * @param string|array $columns the columns to be selected. + * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). + * The method will automatically quote the column names unless a column contains some parenthesis + * (which means the column contains a Sphinx expression). + * @param string $option additional option that should be appended to the 'SELECT' keyword. + * @return static the query object itself */ public function select($columns, $option = null) { @@ -350,8 +350,8 @@ class Query extends Component implements QueryInterface /** * Sets the value indicating whether to SELECT DISTINCT or not. - * @param boolean $value whether to SELECT DISTINCT or not. - * @return static the query object itself + * @param boolean $value whether to SELECT DISTINCT or not. + * @return static the query object itself */ public function distinct($value = true) { @@ -362,11 +362,11 @@ class Query extends Component implements QueryInterface /** * Sets the FROM part of the query. - * @param string|array $tables the table(s) to be selected from. This can be either a string (e.g. `'idx_user'`) - * or an array (e.g. `['idx_user', 'idx_user_delta']`) specifying one or several index names. - * The method will automatically quote the table names unless it contains some parenthesis - * (which means the table is given as a sub-query or Sphinx expression). - * @return static the query object itself + * @param string|array $tables the table(s) to be selected from. This can be either a string (e.g. `'idx_user'`) + * or an array (e.g. `['idx_user', 'idx_user_delta']`) specifying one or several index names. + * The method will automatically quote the table names unless it contains some parenthesis + * (which means the table is given as a sub-query or Sphinx expression). + * @return static the query object itself */ public function from($tables) { @@ -381,7 +381,7 @@ class Query extends Component implements QueryInterface /** * Sets the fulltext query text. This text will be composed into * MATCH operator inside the WHERE clause. - * @param string $query fulltext query text. + * @param string $query fulltext query text. * @return static the query object itself */ public function match($query) @@ -417,53 +417,53 @@ class Query extends Component implements QueryInterface * can be one of the followings: * * - `and`: the operands should be concatenated together using `AND`. For example, - * `['and', 'id=1', 'id=2']` will generate `id=1 AND id=2`. If an operand is an array, - * it will be converted into a string using the rules described here. For example, - * `['and', 'type=1', ['or', 'id=1', 'id=2']]` will generate `type=1 AND (id=1 OR id=2)`. - * The method will NOT do any quoting or escaping. + * `['and', 'id=1', 'id=2']` will generate `id=1 AND id=2`. If an operand is an array, + * it will be converted into a string using the rules described here. For example, + * `['and', 'type=1', ['or', 'id=1', 'id=2']]` will generate `type=1 AND (id=1 OR id=2)`. + * The method will NOT do any quoting or escaping. * * - `or`: similar to the `and` operator except that the operands are concatenated using `OR`. * * - `between`: operand 1 should be the column name, and operand 2 and 3 should be the - * starting and ending values of the range that the column is in. - * For example, `['between', 'id', 1, 10]` will generate `id BETWEEN 1 AND 10`. + * starting and ending values of the range that the column is in. + * For example, `['between', 'id', 1, 10]` will generate `id BETWEEN 1 AND 10`. * * - `not between`: similar to `between` except the `BETWEEN` is replaced with `NOT BETWEEN` - * in the generated condition. + * in the generated condition. * * - `in`: operand 1 should be a column or DB expression with parenthesis. Operand 2 can be an array - * or a Query object. If the former, the array represents the range of the values that the column - * or DB expression should be in. If the latter, a sub-query will be generated to represent the range. - * For example, `['in', 'id', [1, 2, 3]]` will generate `id IN (1, 2, 3)`; - * `['in', 'id', (new Query)->select('id')->from('user'))]` will generate - * `id IN (SELECT id FROM user)`. The method will properly quote the column name and escape values in the range. - * The `in` operator also supports composite columns. In this case, operand 1 should be an array of the columns, - * while operand 2 should be an array of arrays or a `Query` object representing the range of the columns. + * or a Query object. If the former, the array represents the range of the values that the column + * or DB expression should be in. If the latter, a sub-query will be generated to represent the range. + * For example, `['in', 'id', [1, 2, 3]]` will generate `id IN (1, 2, 3)`; + * `['in', 'id', (new Query)->select('id')->from('user'))]` will generate + * `id IN (SELECT id FROM user)`. The method will properly quote the column name and escape values in the range. + * The `in` operator also supports composite columns. In this case, operand 1 should be an array of the columns, + * while operand 2 should be an array of arrays or a `Query` object representing the range of the columns. * * - `not in`: similar to the `in` operator except that `IN` is replaced with `NOT IN` in the generated condition. * * - `like`: operand 1 should be a column or DB expression, and operand 2 be a string or an array representing - * the values that the column or DB expression should be like. - * For example, `['like', 'name', '%tester%']` will generate `name LIKE '%tester%'`. - * When the value range is given as an array, multiple `LIKE` predicates will be generated and concatenated - * using `AND`. For example, `['like', 'name', ['%test%', '%sample%']]` will generate - * `name LIKE '%test%' AND name LIKE '%sample%'`. - * The method will properly quote the column name and escape values in the range. - * Sometimes, you may want to add the percentage characters to the matching value by yourself, you may supply - * a third operand `false` to do so. For example, `['like', 'name', '%tester', false]` will generate `name LIKE '%tester'`. + * the values that the column or DB expression should be like. + * For example, `['like', 'name', '%tester%']` will generate `name LIKE '%tester%'`. + * When the value range is given as an array, multiple `LIKE` predicates will be generated and concatenated + * using `AND`. For example, `['like', 'name', ['%test%', '%sample%']]` will generate + * `name LIKE '%test%' AND name LIKE '%sample%'`. + * The method will properly quote the column name and escape values in the range. + * Sometimes, you may want to add the percentage characters to the matching value by yourself, you may supply + * a third operand `false` to do so. For example, `['like', 'name', '%tester', false]` will generate `name LIKE '%tester'`. * * - `or like`: similar to the `like` operator except that `OR` is used to concatenate the `LIKE` - * predicates when operand 2 is an array. + * predicates when operand 2 is an array. * * - `not like`: similar to the `like` operator except that `LIKE` is replaced with `NOT LIKE` - * in the generated condition. + * in the generated condition. * * - `or not like`: similar to the `not like` operator except that `OR` is used to concatenate - * the `NOT LIKE` predicates. + * the `NOT LIKE` predicates. * - * @param string|array $condition the conditions that should be put in the WHERE part. - * @param array $params the parameters (name => value) to be bound to the query. - * @return static the query object itself + * @param string|array $condition the conditions that should be put in the WHERE part. + * @param array $params the parameters (name => value) to be bound to the query. + * @return static the query object itself * @see andWhere() * @see orWhere() */ @@ -477,10 +477,10 @@ class Query extends Component implements QueryInterface /** * Adds an additional WHERE condition to the existing one. * The new condition and the existing one will be joined using the 'AND' operator. - * @param string|array $condition the new WHERE condition. Please refer to [[where()]] - * on how to specify this parameter. - * @param array $params the parameters (name => value) to be bound to the query. - * @return static the query object itself + * @param string|array $condition the new WHERE condition. Please refer to [[where()]] + * on how to specify this parameter. + * @param array $params the parameters (name => value) to be bound to the query. + * @return static the query object itself * @see where() * @see orWhere() */ @@ -498,10 +498,10 @@ class Query extends Component implements QueryInterface /** * Adds an additional WHERE condition to the existing one. * The new condition and the existing one will be joined using the 'OR' operator. - * @param string|array $condition the new WHERE condition. Please refer to [[where()]] - * on how to specify this parameter. - * @param array $params the parameters (name => value) to be bound to the query. - * @return static the query object itself + * @param string|array $condition the new WHERE condition. Please refer to [[where()]] + * on how to specify this parameter. + * @param array $params the parameters (name => value) to be bound to the query. + * @return static the query object itself * @see where() * @see andWhere() */ @@ -518,11 +518,11 @@ class Query extends Component implements QueryInterface /** * Sets the GROUP BY part of the query. - * @param string|array $columns the columns to be grouped by. - * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). - * The method will automatically quote the column names unless a column contains some parenthesis - * (which means the column contains a DB expression). - * @return static the query object itself + * @param string|array $columns the columns to be grouped by. + * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). + * The method will automatically quote the column names unless a column contains some parenthesis + * (which means the column contains a DB expression). + * @return static the query object itself * @see addGroupBy() */ public function groupBy($columns) @@ -537,11 +537,11 @@ class Query extends Component implements QueryInterface /** * Adds additional group-by columns to the existing ones. - * @param string|array $columns additional columns to be grouped by. - * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). - * The method will automatically quote the column names unless a column contains some parenthesis - * (which means the column contains a DB expression). - * @return static the query object itself + * @param string|array $columns additional columns to be grouped by. + * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']). + * The method will automatically quote the column names unless a column contains some parenthesis + * (which means the column contains a DB expression). + * @return static the query object itself * @see groupBy() */ public function addGroupBy($columns) @@ -560,8 +560,8 @@ class Query extends Component implements QueryInterface /** * Sets the parameters to be bound to the query. - * @param array $params list of query parameter values indexed by parameter placeholders. - * For example, `[':name' => 'Dan', ':age' => 31]`. + * @param array $params list of query parameter values indexed by parameter placeholders. + * For example, `[':name' => 'Dan', ':age' => 31]`. * @return static the query object itself * @see addParams() */ @@ -574,8 +574,8 @@ class Query extends Component implements QueryInterface /** * Adds additional parameters to be bound to the query. - * @param array $params list of query parameter values indexed by parameter placeholders. - * For example, `[':name' => 'Dan', ':age' => 31]`. + * @param array $params list of query parameter values indexed by parameter placeholders. + * For example, `[':name' => 'Dan', ':age' => 31]`. * @return static the query object itself * @see params() */ @@ -600,7 +600,7 @@ class Query extends Component implements QueryInterface /** * Sets the query options. - * @param array $options query options in format: optionName => optionValue + * @param array $options query options in format: optionName => optionValue * @return static the query object itself * @see addOptions() */ @@ -613,7 +613,7 @@ class Query extends Component implements QueryInterface /** * Adds additional query options. - * @param array $options query options in format: optionName => optionValue + * @param array $options query options in format: optionName => optionValue * @return static the query object itself * @see options() */ @@ -630,12 +630,12 @@ class Query extends Component implements QueryInterface /** * Sets the WITHIN GROUP ORDER BY part of the query. - * @param string|array $columns the columns (and the directions) to find best row within a group. - * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array - * (e.g. `['id' => Query::SORT_ASC, 'name' => Query::SORT_DESC]`). - * The method will automatically quote the column names unless a column contains some parenthesis - * (which means the column contains a DB expression). - * @return static the query object itself + * @param string|array $columns the columns (and the directions) to find best row within a group. + * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array + * (e.g. `['id' => Query::SORT_ASC, 'name' => Query::SORT_DESC]`). + * The method will automatically quote the column names unless a column contains some parenthesis + * (which means the column contains a DB expression). + * @return static the query object itself * @see addWithin() */ public function within($columns) @@ -647,12 +647,12 @@ class Query extends Component implements QueryInterface /** * Adds additional WITHIN GROUP ORDER BY columns to the query. - * @param string|array $columns the columns (and the directions) to find best row within a group. - * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array - * (e.g. `['id' => Query::SORT_ASC, 'name' => Query::SORT_DESC]`). - * The method will automatically quote the column names unless a column contains some parenthesis - * (which means the column contains a DB expression). - * @return static the query object itself + * @param string|array $columns the columns (and the directions) to find best row within a group. + * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array + * (e.g. `['id' => Query::SORT_ASC, 'name' => Query::SORT_DESC]`). + * The method will automatically quote the column names unless a column contains some parenthesis + * (which means the column contains a DB expression). + * @return static the query object itself * @see within() */ public function addWithin($columns) @@ -670,8 +670,8 @@ class Query extends Component implements QueryInterface /** * Sets the PHP callback, which should be used to retrieve the source data * for the snippets building. - * @param callable $callback PHP callback, which should be used to fetch source data for the snippets. - * @return static the query object itself + * @param callable $callback PHP callback, which should be used to fetch source data for the snippets. + * @return static the query object itself * @see snippetCallback */ public function snippetCallback($callback) @@ -683,7 +683,7 @@ class Query extends Component implements QueryInterface /** * Sets the call snippets query options. - * @param array $options call snippet options in format: option_name => option_value + * @param array $options call snippet options in format: option_name => option_value * @return static the query object itself * @see snippetCallback */ @@ -697,7 +697,7 @@ class Query extends Component implements QueryInterface /** * Fills the query result rows with the snippets built from source determined by * [[snippetCallback]] result. - * @param array $rows raw query result rows. + * @param array $rows raw query result rows. * @return array|ActiveRecord[] query result rows with filled up snippets. */ protected function fillUpSnippets($rows) @@ -718,9 +718,9 @@ class Query extends Component implements QueryInterface /** * Builds a snippets from provided source data. - * @param array $source the source data to extract a snippet from. + * @param array $source the source data to extract a snippet from. * @throws InvalidCallException in case [[match]] is not specified. - * @return array snippets list. + * @return array snippets list. */ protected function callSnippets(array $source) { @@ -729,9 +729,9 @@ class Query extends Component implements QueryInterface /** * Builds a snippets from provided source data by the given index. - * @param array $source the source data to extract a snippet from. - * @param string $from name of the source index. - * @return array snippets list. + * @param array $source the source data to extract a snippet from. + * @param string $from name of the source index. + * @return array snippets list. * @throws InvalidCallException in case [[match]] is not specified. */ protected function callSnippetsInternal(array $source, $from) diff --git a/extensions/sphinx/QueryBuilder.php b/extensions/sphinx/QueryBuilder.php index c656c84..23b1963 100644 --- a/extensions/sphinx/QueryBuilder.php +++ b/extensions/sphinx/QueryBuilder.php @@ -41,7 +41,7 @@ class QueryBuilder extends Object /** * Constructor. * @param Connection $connection the Sphinx 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 = []) { @@ -51,12 +51,12 @@ class QueryBuilder extends Object /** * Generates a SELECT SQL statement from a [[Query]] object. - * @param Query $query the [[Query]] object from which the SQL statement will be generated - * @param array $params the parameters to be bound to the generated SQL statement. These parameters will - * be included in the result with the additional parameters generated during the query building process. + * @param Query $query the [[Query]] object from which the SQL statement will be generated + * @param array $params the parameters to be bound to the generated SQL statement. These parameters will + * be included in the result with the additional parameters generated during the query building process. * @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). The parameters returned - * include those provided in `$params`. + * parameters to be bound to the SQL statement (the second array element). The parameters returned + * include those provided in `$params`. */ public function build($query, $params = []) { @@ -95,18 +95,18 @@ class QueryBuilder extends Object * * ~~~ * $sql = $queryBuilder->insert('idx_user', [ - * 'name' => 'Sam', - * 'age' => 30, - * 'id' => 10, + * 'name' => 'Sam', + * 'age' => 30, + * 'id' => 10, * ], $params); * ~~~ * * The method will properly escape the index and column names. * - * @param string $index the index that new rows will be inserted into. - * @param array $columns the column data (name => value) to be inserted into the index. - * @param array $params the binding parameters that will be generated by this method. - * They should be bound to the Sphinx command later. + * @param string $index the index that new rows will be inserted into. + * @param array $columns the column data (name => value) to be inserted into the index. + * @param array $params the binding parameters that will be generated by this method. + * They should be bound to the Sphinx command later. * @return string the INSERT SQL */ public function insert($index, $columns, &$params) @@ -120,18 +120,18 @@ class QueryBuilder extends Object * * ~~~ * $sql = $queryBuilder->replace('idx_user', [ - * 'name' => 'Sam', - * 'age' => 30, - * 'id' => 10, + * 'name' => 'Sam', + * 'age' => 30, + * 'id' => 10, * ], $params); * ~~~ * * The method will properly escape the index and column names. * - * @param string $index the index that new rows will be replaced. - * @param array $columns the column data (name => value) to be replaced in the index. - * @param array $params the binding parameters that will be generated by this method. - * They should be bound to the Sphinx command later. + * @param string $index the index that new rows will be replaced. + * @param array $columns the column data (name => value) to be replaced in the index. + * @param array $params the binding parameters that will be generated by this method. + * They should be bound to the Sphinx command later. * @return string the INSERT SQL */ public function replace($index, $columns, &$params) @@ -141,10 +141,10 @@ class QueryBuilder extends Object /** * Generates INSERT/REPLACE SQL statement. - * @param string $statement statement ot be generated. - * @param string $index the affected index name. - * @param array $columns the column data (name => value). - * @param array $params the binding parameters that will be generated by this method. + * @param string $statement statement ot be generated. + * @param string $index the affected index name. + * @param array $columns the column data (name => value). + * @param array $params the binding parameters that will be generated by this method. * @return string generated SQL */ protected function generateInsertReplace($statement, $index, $columns, &$params) @@ -180,11 +180,11 @@ class QueryBuilder extends Object * * 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 array $params the binding parameters that will be generated by this method. - * They should be bound to the Sphinx command later. + * @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 array $params the binding parameters that will be generated by this method. + * They should be bound to the Sphinx command later. * @return string the batch INSERT SQL statement */ public function batchInsert($index, $columns, $rows, &$params) @@ -206,11 +206,11 @@ class QueryBuilder extends Object * * 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 array $params the binding parameters that will be generated by this method. - * They should be bound to the Sphinx command later. + * @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 array $params the binding parameters that will be generated by this method. + * They should be bound to the Sphinx command later. * @return string the batch INSERT SQL statement */ public function batchReplace($index, $columns, $rows, &$params) @@ -220,11 +220,11 @@ class QueryBuilder extends Object /** * Generates a batch INSERT/REPLACE SQL statement. - * @param string $statement statement ot be generated. - * @param string $index the affected index name. - * @param array $columns the column data (name => value). - * @param array $rows the rows to be batch inserted into the index - * @param array $params the binding parameters that will be generated by this method. + * @param string $statement statement ot be generated. + * @param string $index the affected index name. + * @param array $columns the column data (name => value). + * @param array $rows the rows to be batch inserted into the index + * @param array $params the binding parameters that will be generated by this method. * @return string generated SQL */ protected function generateBatchInsertReplace($statement, $index, $columns, $rows, &$params) @@ -263,14 +263,14 @@ class QueryBuilder extends Object * * The method will properly escape the index and column names. * - * @param string $index the index to be updated. - * @param array $columns the column data (name => value) to be updated. - * @param array|string $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 binding parameters that will be modified by this method - * so that they can be bound to the Sphinx command later. - * @param array $options list of options in format: optionName => optionValue - * @return string the UPDATE SQL + * @param string $index the index to be updated. + * @param array $columns the column data (name => value) to be updated. + * @param array|string $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 binding parameters that will be modified by this method + * so that they can be bound to the Sphinx command later. + * @param array $options list of options in format: optionName => optionValue + * @return string the UPDATE SQL */ public function update($index, $columns, $condition, &$params, $options) { @@ -308,12 +308,12 @@ class QueryBuilder extends Object * * The method will properly escape the index and column names. * - * @param string $index the index where the data will be deleted from. - * @param array|string $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 binding parameters that will be modified by this method - * so that they can be bound to the Sphinx command later. - * @return string the DELETE SQL + * @param string $index the index where the data will be deleted from. + * @param array|string $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 binding parameters that will be modified by this method + * so that they can be bound to the Sphinx command later. + * @return string the DELETE SQL */ public function delete($index, $condition, &$params) { @@ -325,7 +325,7 @@ class QueryBuilder extends Object /** * Builds a SQL statement for truncating an 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 string the SQL statement for truncating an index. */ public function truncateIndex($index) @@ -335,14 +335,14 @@ class QueryBuilder extends Object /** * Builds a SQL statement for call 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 - * @param array $params the binding parameters that will be modified by this method - * so that they can be bound to the Sphinx command later. - * @return string the SQL statement for call snippets. + * @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 + * @param array $params the binding parameters that will be modified by this method + * so that they can be bound to the Sphinx command later. + * @return string the SQL statement for call snippets. */ public function callSnippets($index, $source, $match, $options, &$params) { @@ -385,12 +385,12 @@ class QueryBuilder extends Object /** * Builds a SQL statement for returning 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 - * @param array $params the binding parameters that will be modified by this method - * so that they can be bound to the Sphinx command later. - * @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 + * @param array $params the binding parameters that will be modified by this method + * so that they can be bound to the Sphinx command later. + * @return string the SQL statement for call keywords. */ public function callKeywords($index, $text, $fetchStatistic, &$params) { @@ -403,11 +403,11 @@ class QueryBuilder extends Object } /** - * @param array $columns - * @param array $params the binding parameters to be populated - * @param boolean $distinct - * @param string $selectOption - * @return string the SELECT clause built from [[query]]. + * @param array $columns + * @param array $params the binding parameters to be populated + * @param boolean $distinct + * @param string $selectOption + * @return string the SELECT clause built from [[query]]. */ public function buildSelect($columns, &$params, $distinct = false, $selectOption = null) { @@ -442,8 +442,8 @@ class QueryBuilder extends Object } /** - * @param array $indexes - * @param array $params the binding parameters to be populated + * @param array $indexes + * @param array $params the binding parameters to be populated * @return string the FROM clause built from [[query]]. */ public function buildFrom($indexes, &$params) @@ -478,10 +478,10 @@ class QueryBuilder extends Object } /** - * @param string[] $indexes list of index names, which affected by query - * @param string|array $condition - * @param array $params the binding parameters to be populated - * @return string the WHERE clause built from [[query]]. + * @param string[] $indexes list of index names, which affected by query + * @param string|array $condition + * @param array $params the binding parameters to be populated + * @return string the WHERE clause built from [[query]]. */ public function buildWhere($indexes, $condition, &$params) { @@ -503,7 +503,7 @@ class QueryBuilder extends Object } /** - * @param array $columns + * @param array $columns * @return string the GROUP BY clause */ public function buildGroupBy($columns) @@ -512,7 +512,7 @@ class QueryBuilder extends Object } /** - * @param array $columns + * @param array $columns * @return string the ORDER BY clause built from [[query]]. */ public function buildOrderBy($columns) @@ -533,9 +533,9 @@ class QueryBuilder extends Object } /** - * @param integer $limit - * @param integer $offset - * @return string the LIMIT and OFFSET clauses built from [[query]]. + * @param integer $limit + * @param integer $offset + * @return string the LIMIT and OFFSET clauses built from [[query]]. */ public function buildLimit($limit, $offset) { @@ -555,8 +555,8 @@ class QueryBuilder extends Object /** * Processes columns and properly quote them if necessary. * It will join all columns into a string with comma as separators. - * @param string|array $columns the columns to be processed - * @return string the processing result + * @param string|array $columns the columns to be processed + * @return string the processing result */ public function buildColumns($columns) { @@ -580,11 +580,11 @@ class QueryBuilder extends Object /** * Parses the condition specification and generates the corresponding SQL expression. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string|array $condition the condition specification. Please refer to [[Query::where()]] - * on how to specify a condition. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string|array $condition the condition specification. Please refer to [[Query::where()]] + * on how to specify a condition. + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression * @throws \yii\db\Exception if the condition is in bad format */ public function buildCondition($indexes, $condition, &$params) @@ -625,10 +625,10 @@ class QueryBuilder extends Object /** * Creates a condition based on column-value pairs. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param array $condition the condition specification. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param array $condition the condition specification. + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression */ public function buildHashCondition($indexes, $condition, &$params) { @@ -656,11 +656,11 @@ class QueryBuilder extends Object /** * Connects two or more SQL expressions with the `AND` or `OR` operator. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $operator the operator to use for connecting the given operands - * @param array $operands the SQL expressions to connect. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $operator the operator to use for connecting the given operands + * @param array $operands the SQL expressions to connect. + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression */ public function buildAndCondition($indexes, $operator, $operands, &$params) { @@ -682,13 +682,13 @@ class QueryBuilder extends Object /** * Creates an SQL expressions with the `BETWEEN` operator. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $operator the operator to use (e.g. `BETWEEN` or `NOT BETWEEN`) - * @param array $operands the first operand is the column name. The second and third operands - * describe the interval that column value should be in. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression - * @throws Exception if wrong number of operands have been given. + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $operator the operator to use (e.g. `BETWEEN` or `NOT BETWEEN`) + * @param array $operands the first operand is the column name. The second and third operands + * describe the interval that column value should be in. + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression + * @throws Exception if wrong number of operands have been given. */ public function buildBetweenCondition($indexes, $operator, $operands, &$params) { @@ -711,16 +711,16 @@ class QueryBuilder extends Object /** * Creates an SQL expressions with the `IN` operator. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) - * @param array $operands the first operand is the column name. If it is an array - * a composite IN condition will be generated. - * The second operand is an array of values that column value should be among. - * If it is an empty array the generated expression will be a `false` value if - * operator is `IN` and empty if operator is `NOT IN`. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression - * @throws Exception if wrong number of operands have been given. + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) + * @param array $operands the first operand is the column name. If it is an array + * a composite IN condition will be generated. + * The second operand is an array of values that column value should be among. + * If it is an empty array the generated expression will be a `false` value if + * operator is `IN` and empty if operator is `NOT IN`. + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression + * @throws Exception if wrong number of operands have been given. */ public function buildInCondition($indexes, $operator, $operands, &$params) { @@ -781,12 +781,12 @@ class QueryBuilder extends Object } /** - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) - * @param array $columns - * @param array $values - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $operator the operator to use (e.g. `IN` or `NOT IN`) + * @param array $columns + * @param array $values + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression */ protected function buildCompositeInCondition($indexes, $operator, $columns, $values, &$params) { @@ -813,9 +813,9 @@ class QueryBuilder extends Object /** * Creates an SQL expressions with the `LIKE` operator. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $operator the operator to use (e.g. `LIKE`, `NOT LIKE`, `OR LIKE` or `OR NOT LIKE`) - * @param array $operands an array of two or three operands + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $operator the operator to use (e.g. `LIKE`, `NOT LIKE`, `OR LIKE` or `OR NOT LIKE`) + * @param array $operands an array of two or three operands * * - The first operand is the column name. * - The second operand is a single value or an array of values that column value @@ -828,8 +828,8 @@ class QueryBuilder extends Object * You may use `false` or an empty array to indicate the values are already escaped and no escape * should be applied. Note that when using an escape mapping (or the third operand is not provided), * the values will be automatically enclosed within a pair of percentage characters. - * @param array $params the binding parameters to be populated - * @return string the generated SQL expression + * @param array $params the binding parameters to be populated + * @return string the generated SQL expression * @throws InvalidParamException if wrong number of operands have been given. */ public function buildLikeCondition($indexes, $operator, $operands, &$params) @@ -871,7 +871,7 @@ class QueryBuilder extends Object } /** - * @param array $columns + * @param array $columns * @return string the ORDER BY clause built from [[query]]. */ public function buildWithin($columns) @@ -892,8 +892,8 @@ class QueryBuilder extends Object } /** - * @param array $options query options in format: optionName => optionValue - * @param array $params the binding parameters to be populated + * @param array $options query options in format: optionName => optionValue + * @param array $params the binding parameters to be populated * @return string the OPTION clause build from [[query]] */ public function buildOption($options, &$params) @@ -937,11 +937,11 @@ class QueryBuilder extends Object /** * Composes column value for SQL, taking in account the column type. - * @param IndexSchema[] $indexes list of indexes, which affected by query - * @param string $columnName name of the column - * @param mixed $value raw column value - * @param array $params the binding parameters to be populated - * @return string SQL expression, which represents column value + * @param IndexSchema[] $indexes list of indexes, which affected by query + * @param string $columnName name of the column + * @param mixed $value raw column value + * @param array $params the binding parameters to be populated + * @return string SQL expression, which represents column value */ protected function composeColumnValue($indexes, $columnName, $value, &$params) { diff --git a/extensions/sphinx/Schema.php b/extensions/sphinx/Schema.php index 49eef13..7b1bb6f 100644 --- a/extensions/sphinx/Schema.php +++ b/extensions/sphinx/Schema.php @@ -78,7 +78,7 @@ class Schema extends Object /** * Loads the metadata for the specified index. - * @param string $name index name + * @param string $name index name * @return IndexSchema driver dependent index metadata. Null if the index does not exist. */ protected function loadIndexSchema($name) @@ -97,7 +97,7 @@ class Schema extends Object /** * Resolves the index name. * @param IndexSchema $index the index metadata object - * @param string $name the index name + * @param string $name the index name */ protected function resolveIndexNames($index, $name) { @@ -117,8 +117,8 @@ class Schema extends Object /** * Obtains the metadata for the named index. - * @param string $name index name. The index name may contain schema name if any. Do not quote the index name. - * @param boolean $refresh whether to reload the index schema even if it is found in the cache. + * @param string $name index name. The index name may contain schema name if any. Do not quote the index name. + * @param boolean $refresh whether to reload the index schema even if it is found in the cache. * @return IndexSchema index metadata. Null if the named index does not exist. */ public function getIndexSchema($name, $refresh = false) @@ -153,8 +153,8 @@ class Schema extends Object /** * Returns the cache key for the specified index name. - * @param string $name the index name - * @return mixed the cache key + * @param string $name the index name + * @return mixed the cache key */ protected function getCacheKey($name) { @@ -182,10 +182,10 @@ class Schema extends Object /** * Returns the metadata for all indexes in the database. - * @param boolean $refresh whether to fetch the latest available index schemas. If this is false, - * cached data may be returned if available. + * @param boolean $refresh whether to fetch the latest available index schemas. If this is false, + * cached data may be returned if available. * @return IndexSchema[] the metadata for all indexes in the Sphinx. - * Each array element is an instance of [[IndexSchema]] or its child class. + * Each array element is an instance of [[IndexSchema]] or its child class. */ public function getIndexSchemas($refresh = false) { @@ -201,8 +201,8 @@ class Schema extends Object /** * Returns all index names in the Sphinx. - * @param boolean $refresh whether to fetch the latest available index names. If this is false, - * index names fetched previously (if available) will be returned. + * @param boolean $refresh whether to fetch the latest available index names. If this is false, + * index names fetched previously (if available) will be returned. * @return string[] all index names in the Sphinx. */ public function getIndexNames($refresh = false) @@ -216,9 +216,9 @@ class Schema extends Object /** * Returns all index types in the Sphinx. - * @param boolean $refresh whether to fetch the latest available index types. If this is false, - * index types fetched previously (if available) will be returned. - * @return array all index types in the Sphinx in format: index name => index type. + * @param boolean $refresh whether to fetch the latest available index types. If this is false, + * index types fetched previously (if available) will be returned. + * @return array all index types in the Sphinx in format: index name => index type. */ public function getIndexTypes($refresh = false) { @@ -269,7 +269,7 @@ class Schema extends Object /** * Determines the PDO type for the given PHP data value. - * @param mixed $data the data whose PDO type is to be determined + * @param mixed $data the data whose PDO type is to be determined * @return integer the PDO type * @see http://www.php.net/manual/en/pdo.constants.php */ @@ -316,7 +316,7 @@ class Schema extends Object /** * Quotes a string value for use in a query. * Note that if the parameter is not a string, 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 * @see http://www.php.net/manual/en/function.PDO-quote.php */ @@ -335,7 +335,7 @@ class Schema extends Object * If the index name contains schema prefix, the prefix will also be properly quoted. * If the index name is already quoted or contains '(' or '{{', * then this method will do nothing. - * @param string $name index name + * @param string $name index name * @return string the properly quoted index name * @see quoteSimpleTableName */ @@ -353,7 +353,7 @@ class Schema extends Object * If the column name contains prefix, the prefix will also be properly quoted. * If the column name is already quoted or contains '(', '[[' or '{{', * then this method will do nothing. - * @param string $name column name + * @param string $name column name * @return string the properly quoted column name * @see quoteSimpleColumnName */ @@ -375,7 +375,7 @@ class Schema extends Object /** * Quotes a index name for use in a query. * A simple index name has no schema prefix. - * @param string $name index name + * @param string $name index name * @return string the properly quoted index name */ public function quoteSimpleIndexName($name) @@ -386,7 +386,7 @@ class Schema extends Object /** * Quotes a column name for use in a query. * A simple column name has no prefix. - * @param string $name column name + * @param string $name column name * @return string the properly quoted column name */ public function quoteSimpleColumnName($name) @@ -398,7 +398,7 @@ class Schema extends Object * Returns the actual name of a given index name. * This method will strip off curly brackets from the given index name * and replace the percentage character '%' with [[Connection::indexPrefix]]. - * @param string $name the index name to be converted + * @param string $name the index name to be converted * @return string the real name of the given index name */ public function getRawIndexName($name) @@ -414,8 +414,8 @@ class Schema extends Object /** * Extracts the PHP type from abstract DB type. - * @param ColumnSchema $column the column schema information - * @return string PHP type name + * @param ColumnSchema $column the column schema information + * @return string PHP type name */ protected function getColumnPhpType($column) { @@ -441,9 +441,9 @@ class Schema extends Object /** * Collects the metadata of index columns. - * @param IndexSchema $index the index metadata - * @return boolean whether the index exists in the database - * @throws \Exception if DB query fails + * @param IndexSchema $index the index metadata + * @return boolean whether the index exists in the database + * @throws \Exception if DB query fails */ protected function findColumns($index) { @@ -471,7 +471,7 @@ class Schema extends Object /** * Loads the column information into a [[ColumnSchema]] object. - * @param array $info column information + * @param array $info column information * @return ColumnSchema the column schema object */ protected function loadColumnSchema($info) diff --git a/extensions/swiftmailer/Mailer.php b/extensions/swiftmailer/Mailer.php index 353a7fc..32ca7e3 100644 --- a/extensions/swiftmailer/Mailer.php +++ b/extensions/swiftmailer/Mailer.php @@ -101,7 +101,7 @@ class Mailer extends BaseMailer } /** - * @param array|\Swift_Transport $transport + * @param array|\Swift_Transport $transport * @throws InvalidConfigException on invalid argument. */ public function setTransport($transport) @@ -149,9 +149,9 @@ class Mailer extends BaseMailer /** * Creates email transport instance by its array configuration. - * @param array $config transport configuration. + * @param array $config transport configuration. * @throws \yii\base\InvalidConfigException on invalid transport configuration. - * @return \Swift_Transport transport instance. + * @return \Swift_Transport transport instance. */ protected function createTransport(array $config) { @@ -178,8 +178,8 @@ class Mailer extends BaseMailer /** * Creates Swift library object, from given array configuration. - * @param array $config object configuration - * @return Object created object + * @param array $config object configuration + * @return Object created object * @throws \yii\base\InvalidConfigException on invalid configuration. */ protected function createSwiftObject(array $config) diff --git a/extensions/swiftmailer/Message.php b/extensions/swiftmailer/Message.php index 361a021..23818bc 100644 --- a/extensions/swiftmailer/Message.php +++ b/extensions/swiftmailer/Message.php @@ -191,7 +191,7 @@ class Message extends BaseMessage * Sets the message body. * If body is already set and its content type matches given one, it will * be overridden, if content type miss match the multipart message will be composed. - * @param string $body body content. + * @param string $body body content. * @param string $contentType body content type. */ protected function setBody($body, $contentType) diff --git a/extensions/twig/TwigSimpleFileLoader.php b/extensions/twig/TwigSimpleFileLoader.php index 819c949..47639c5 100644 --- a/extensions/twig/TwigSimpleFileLoader.php +++ b/extensions/twig/TwigSimpleFileLoader.php @@ -1,7 +1,5 @@ <?php /** - * Simple file system wrapper for twig to process twig files - * * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ @@ -32,8 +30,8 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface /** * Compare a file's freshness with previously stored timestamp * - * @param string $name file name to check - * @param integer $time timestamp to compare with + * @param string $name file name to check + * @param integer $time timestamp to compare with * @return boolean true if file is still fresh and not changes, false otherwise */ public function isFresh($name, $time) @@ -44,7 +42,7 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface /** * Get the source of given file name * - * @param string $name file name + * @param string $name file name * @return string contents of given file name */ public function getSource($name) @@ -54,7 +52,7 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface /** * Get unique key that can represent this file uniquely among other files. - * @param string $name + * @param string $name * @return string */ public function getCacheKey($name) @@ -64,7 +62,7 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface /** * internally used to get absolute path of given file name - * @param string $name file name + * @param string $name file name * @return string absolute path of file */ protected function getFilePath($name) diff --git a/extensions/twig/ViewRenderer.php b/extensions/twig/ViewRenderer.php index 79ad970..edd2b27 100644 --- a/extensions/twig/ViewRenderer.php +++ b/extensions/twig/ViewRenderer.php @@ -131,9 +131,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 */ @@ -200,8 +200,8 @@ class ViewRenderer extends BaseViewRenderer /** * Adds custom function or filter - * @param string $classType 'Function' or 'Filter' - * @param array $elements Parameters of elements to add + * @param string $classType 'Function' or 'Filter' + * @param array $elements Parameters of elements to add * @throws \Exception */ private function _addCustom($classType, $elements)