Skip to content

Commit

Permalink
fixed phpdoc command.
Browse files Browse the repository at this point in the history
fixed Markdown::process() to make it compatible with parent declaration.
  • Loading branch information
qiangxue committed Jan 11, 2014
1 parent d6eeab2 commit 135f064
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/controllers/PhpDocController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function actionProperty($root = null)
{
$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)) {
Expand Down
4 changes: 2 additions & 2 deletions extensions/apidoc/helpers/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>') {
Expand Down Expand Up @@ -77,4 +77,4 @@ public static function process($content, $context)

return $content;
}
}
}

0 comments on commit 135f064

Please sign in to comment.