mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-21 00:54:53 +08:00
many phpcs fixes
This commit is contained in:
@@ -13,7 +13,6 @@ use yii\base\InvalidConfigException;
|
||||
use yii\base\Model;
|
||||
use yii\web\View;
|
||||
|
||||
|
||||
/**
|
||||
* This is the base class for all generator classes.
|
||||
*
|
||||
|
||||
@@ -73,7 +73,7 @@ HTML;
|
||||
}
|
||||
}
|
||||
// Added lines only on the right side
|
||||
else if ($change['tag'] === 'insert') {
|
||||
elseif ($change['tag'] === 'insert') {
|
||||
foreach ($change['changed']['lines'] as $no => $line) {
|
||||
$toLine = $change['changed']['offset'] + $no + 1;
|
||||
$html .= <<<HTML
|
||||
@@ -86,7 +86,7 @@ HTML;
|
||||
}
|
||||
}
|
||||
// Show deleted lines only on the left side
|
||||
else if ($change['tag'] === 'delete') {
|
||||
elseif ($change['tag'] === 'delete') {
|
||||
foreach ($change['base']['lines'] as $no => $line) {
|
||||
$fromLine = $change['base']['offset'] + $no + 1;
|
||||
$html .= <<<HTML
|
||||
@@ -99,7 +99,7 @@ HTML;
|
||||
}
|
||||
}
|
||||
// Show modified lines on both sides
|
||||
else if ($change['tag'] === 'replace') {
|
||||
elseif ($change['tag'] === 'replace') {
|
||||
foreach ($change['base']['lines'] as $no => $line) {
|
||||
$fromLine = $change['base']['offset'] + $no + 1;
|
||||
$html .= <<<HTML
|
||||
@@ -132,4 +132,4 @@ HTML;
|
||||
HTML;
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,5 +499,4 @@ class Generator extends \yii\gii\Generator
|
||||
return $model->attributes();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user