forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ee3ccc
commit b851ff6
Showing
1 changed file
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ | |
use Yii; | ||
|
||
/** | ||
* Replaces outdated links(3xx response codes) add display removed links(4xx response codes). | ||
* Replaces outdated links (3xx response codes) add display removed links (4xx response codes). | ||
* | ||
* This method scan PHP sources(DocBlock) and documentation(Markdown). | ||
* This method scan PHP sources (DocBlock) and documentation (Markdown). | ||
* | ||
* @author Anton Fedonyuk <[email protected]> | ||
* @since 2.0.46 | ||
|
@@ -32,7 +32,7 @@ class FixLinksController extends Controller | |
/** | ||
* @var bool the "safe mode" option: output outdated links instead of replacing them in files | ||
*/ | ||
public $safeMode = false; | ||
public $safeMode = true; | ||
|
||
/** | ||
* @inheritDoc | ||
|
@@ -41,9 +41,9 @@ public function options($actionID) | |
{ | ||
return \array_merge(parent::options($actionID), ['safeMode']); | ||
} | ||
|
||
/** | ||
* Replaces updated links add log removed links. | ||
* Replaces outdated links add log removed links. | ||
* | ||
* @return int | ||
* @throws \yii\base\InvalidConfigException | ||
|
@@ -57,6 +57,33 @@ public function actionIndex() | |
return ExitCode::OK; | ||
} | ||
|
||
/** | ||
* Replaces outdated links add log removed links in PHP sources (DocBlock). | ||
* | ||
* @return int | ||
* @throws \yii\base\InvalidConfigException | ||
*/ | ||
public function actionSources() | ||
{ | ||
$this->linkChecker = new LinkChecker(); | ||
$this->fixSources(); | ||
|
||
return ExitCode::OK; | ||
} | ||
/** | ||
* Replaces outdated links add log removed links in Markdown documentation. | ||
* | ||
* @return int | ||
* @throws \yii\base\InvalidConfigException | ||
*/ | ||
public function actionDocs() | ||
{ | ||
$this->linkChecker = new LinkChecker(); | ||
$this->fixDocs(); | ||
|
||
return ExitCode::OK; | ||
} | ||
|
||
/** | ||
* Fix outdated links in PHP sources(DocBlock). | ||
* | ||
|