mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
fixed phpdoc command.
fixed Markdown::process() to make it compatible with parent declaration.
This commit is contained in:
@ -43,7 +43,7 @@ class PhpDocController extends Controller
|
||||
{
|
||||
$except = [];
|
||||
if ($root === null) {
|
||||
$root = dirname(dirname(YII_PATH));
|
||||
$root = dirname(YII_PATH);
|
||||
$extensionPath = "$root/extensions";
|
||||
foreach (scandir($extensionPath) as $extension) {
|
||||
if (ctype_alpha($extension) && is_dir($extensionPath . '/' . $extension)) {
|
||||
|
@ -32,7 +32,7 @@ class Markdown extends \yii\helpers\Markdown
|
||||
* @param TypeDoc $context
|
||||
* @return string
|
||||
*/
|
||||
public static function process($content, $context)
|
||||
public static function process($content, $context = null)
|
||||
{
|
||||
$content = trim(parent::process($content, []));
|
||||
if (!strncmp($content, '<p>', 3) && substr($content, -4, 4) == '</p>') {
|
||||
@ -77,4 +77,4 @@ class Markdown extends \yii\helpers\Markdown
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user