This commit is contained in:
2021-01-19 20:12:29 +08:00
parent 14d58128cf
commit bd8fabb5ab
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ abstract class GiiBase
$content = file_get_contents($this->getFilePath($className));
$explode = explode(PHP_EOL, $content);
$exists = array_slice($explode, $fun->getStartLine() - 1, $fun->getEndLine() - $fun->getStartLine() + 1);
$exists = array_slice($explode, $fun->getStartLine(), $fun->getEndLine() - $fun->getStartLine() + 1);
return implode(PHP_EOL, $exists);
}
+2 -1
View File
@@ -167,7 +167,8 @@ class ' . $managerName . ' extends ActiveRecord
if (!empty($attributes)) {
foreach ($attributes as $attribute) {
$over .= "
#[\"" . $attribute->getName() . "('" . implode('\',\'', $attribute->getArguments()) . "')]
#[\\" . $attribute->getName() . "('" . implode('\',\'', $attribute->getArguments()) . "')]
";
}
}