mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Correction of many errors code inspection.
Adjustments code according to the standards. Adding missing PHPDoc comment.
This commit is contained in:
@ -89,8 +89,9 @@ class FixtureController extends Controller
|
||||
}
|
||||
|
||||
if (!$foundFixtures) {
|
||||
throw new Exception("No files were found by name: \"" . implode(', ', $fixtures) . "\".\n"
|
||||
. "Check that files with these name exists, under fixtures path: \n\"" . $this->getFixturePath() . "\"."
|
||||
throw new Exception(
|
||||
"No files were found by name: \"" . implode(', ', $fixtures) . "\".\n" .
|
||||
"Check that files with these name exists, under fixtures path: \n\"" . $this->getFixturePath() . "\"."
|
||||
);
|
||||
}
|
||||
|
||||
@ -131,8 +132,9 @@ class FixtureController extends Controller
|
||||
}
|
||||
|
||||
if (!$foundFixtures) {
|
||||
throw new Exception("No files were found by name: \"" . implode(', ', $fixtures) . "\".\n"
|
||||
. "Check that fixtures with these name exists, under fixtures path: \n\"" . $this->getFixturePath() . "\"."
|
||||
throw new Exception(
|
||||
"No files were found by name: \"" . implode(', ', $fixtures) . "\".\n" .
|
||||
"Check that fixtures with these name exists, under fixtures path: \n\"" . $this->getFixturePath() . "\"."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -221,7 +221,7 @@ class MessageController extends Controller
|
||||
} else {
|
||||
$last_id = $db->getLastInsertID();
|
||||
$db->createCommand()
|
||||
->update(
|
||||
->update(
|
||||
$sourceMessageTable,
|
||||
['message' => new \yii\db\Expression("CONCAT('@@',message,'@@')")],
|
||||
['in', 'id', $obsolete]
|
||||
@ -253,7 +253,10 @@ class MessageController extends Controller
|
||||
foreach ($translator as $currentTranslator) {
|
||||
$n = preg_match_all(
|
||||
'/\b' . $currentTranslator . '\s*\(\s*(\'.*?(?<!\\\\)\'|".*?(?<!\\\\)")\s*,\s*(\'.*?(?<!\\\\)\'|".*?(?<!\\\\)")\s*[,\)]/s',
|
||||
$subject, $matches, PREG_SET_ORDER);
|
||||
$subject,
|
||||
$matches,
|
||||
PREG_SET_ORDER
|
||||
);
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
if (($pos = strpos($matches[$i][1], '.')) !== false) {
|
||||
$category = substr($matches[$i][1], $pos + 1, -1);
|
||||
|
||||
@ -95,7 +95,8 @@ class MigrateController extends Controller
|
||||
*/
|
||||
public function options($actionId)
|
||||
{
|
||||
return array_merge(parent::options($actionId),
|
||||
return array_merge(
|
||||
parent::options($actionId),
|
||||
['migrationPath', 'migrationTable', 'db'], // global for all actions
|
||||
($actionId == 'create') ? ['templateFile'] : [] // action create
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user