use template placeholders instead of html
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
e023899078
commit
087138f228
|
@ -38,7 +38,7 @@ class GenerateCommand extends Command {
|
|||
|
||||
protected static $_templateSimple =
|
||||
'<?php
|
||||
namespace <namespace>;
|
||||
namespace {{<namespace}};
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
@ -47,7 +47,7 @@ use OCP\Migration\IOutput;
|
|||
/**
|
||||
* Auto-generated migration step: Please modify to your needs!
|
||||
*/
|
||||
class <classname> extends SimpleMigrationStep {
|
||||
class {{classname}} extends SimpleMigrationStep {
|
||||
|
||||
/**
|
||||
* @param IOutput $output
|
||||
|
@ -66,7 +66,7 @@ class <classname> extends SimpleMigrationStep {
|
|||
* @since 13.0.0
|
||||
*/
|
||||
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||
<schemabody>
|
||||
{{schemabody}}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,9 +133,9 @@ class <classname> extends SimpleMigrationStep {
|
|||
|
||||
|
||||
$placeHolders = [
|
||||
'<namespace>',
|
||||
'<classname>',
|
||||
'<schemabody>',
|
||||
'{{namespace}}',
|
||||
'{{classname}}',
|
||||
'{{schemabody}}',
|
||||
];
|
||||
$replacements = [
|
||||
$ms->getMigrationsNamespace(),
|
||||
|
|
Loading…
Reference in New Issue