Commit fe14f0c5 by Carsten Brandt

fixed all the PHPdoc in extensions

parent 91965fd3
......@@ -202,39 +202,50 @@ class PhpDocController extends Controller
{
$docBlock = false;
$codeBlock = false;
$listIndent = false;
$listIndent = '';
$tag = false;
$indent = '';
foreach($lines as $i => $line) {
if (preg_match('~^(\s*)/\*\*$~', $line, $matches)) {
$docBlock = true;
$indent = $matches[1];
} elseif (preg_match('~^(\s+)\*+/~', $line)) {
} elseif (preg_match('~^(\s*)\*+/~', $line)) {
if ($docBlock) { // could be the end of normal comment
$lines[$i] = $indent . ' */';
}
$docBlock = false;
$codeBlock = false;
$listIndent = '';
$tag = false;
} elseif ($docBlock) {
$docLine = str_replace("\t", ' ', rtrim(substr(ltrim($line), 2)));
$line = ltrim($line);
if (isset($line[0]) && $line[0] === '*') {
$line = substr($line, 1);
}
if (isset($line[0]) && $line[0] === ' ') {
$line = substr($line, 1);
}
$docLine = str_replace("\t", ' ', rtrim($line));
if (empty($docLine)) {
$listIndent = '';
} elseif ($docLine[0] === '@') {
$listIndent = '';
$codeBlock = false;
$tag = true;
$docLine = preg_replace('/\s+/', ' ', $docLine);
} elseif (preg_match('/^(~~~|```)/', $docLine)) {
$codeBlock = !$codeBlock;
$listIndent = '';
} elseif (preg_match('/^(\s*)([0-9]+\.|-|\*|\+) /', $docLine, $matches)) {
$listIndent = str_repeat(' ', strlen($matches[0]));
$tag = false;
$lines[$i] = $indent . ' * ' . $docLine;
continue;
}
if ($codeBlock) {
$lines[$i] = rtrim($indent . ' * ' . $docLine);
} else {
$lines[$i] = rtrim($indent . ' * ' . (empty($listIndent) ? $docLine : ($listIndent . ltrim($docLine))));
$lines[$i] = rtrim($indent . ' * ' . (empty($listIndent) && !$tag ? $docLine : ($listIndent . ltrim($docLine))));
}
}
}
......
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\codeception;
......
......@@ -196,12 +196,12 @@ class Installer extends LibraryInstaller
file_put_contents($yiiDir . '/' . $file, <<<EOF
<?php
/**
* This is a link provided by the yiisoft/yii2-dev package via yii2-composer plugin.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
* This is a link provided by the yiisoft/yii2-dev package via yii2-composer plugin.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
return require(__DIR__ . '/../yii2-dev/framework/$file');
......
......@@ -186,8 +186,10 @@ class Query extends Component implements QueryInterface
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `elasticsearch` application component will be used.
* @param array $options The options given with this query. Possible options are:
*
* - [routing](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html#search-routing)
* - [search_type](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html)
*
* @return array the query results.
*/
public function search($db = null, $options = [])
......
......@@ -33,7 +33,7 @@ use yii\helpers\Html;
* 'source' => ['USA', 'RUS'],
* ],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/autocomplete/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -37,7 +37,7 @@ use yii\helpers\Json;
* 'dateFormat' => 'yy-mm-dd',
* ],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/datepicker/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -29,7 +29,7 @@ use yii\helpers\Html;
* 'name' => 'country',
* 'clientOptions' => ['step' => 2],
* ]);
*```
* ```
*
* @see http://api.jqueryui.com/spinner/
* @author Alexander Kochetov <creocoder@gmail.com>
......
......@@ -101,10 +101,12 @@ abstract class ActiveRecord extends BaseActiveRecord
/**
* Declares the name of the Mongo collection associated with this AR class.
*
* Collection name can be either a string or array:
* - if string considered as the name of the collection inside the default database.
* - if array - first element considered as the name of the database, second - as
* name of collection inside that database
*
* By default this method returns the class name as the collection name by calling [[Inflector::camel2id()]].
* For example, 'Customer' becomes 'customer', and 'OrderItem' becomes
* 'order_item'. You may override this method if the table is not named after this convention.
......
<?php
/**
* Simple file system wrapper for twig to process twig files
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
......
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