Commit fe14f0c5 by Carsten Brandt

fixed all the PHPdoc in extensions

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