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 =
|
protected static $_templateSimple =
|
||||||
'<?php
|
'<?php
|
||||||
namespace <namespace>;
|
namespace {{<namespace}};
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use OCP\Migration\SimpleMigrationStep;
|
use OCP\Migration\SimpleMigrationStep;
|
||||||
|
@ -47,7 +47,7 @@ use OCP\Migration\IOutput;
|
||||||
/**
|
/**
|
||||||
* Auto-generated migration step: Please modify to your needs!
|
* Auto-generated migration step: Please modify to your needs!
|
||||||
*/
|
*/
|
||||||
class <classname> extends SimpleMigrationStep {
|
class {{classname}} extends SimpleMigrationStep {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param IOutput $output
|
* @param IOutput $output
|
||||||
|
@ -66,7 +66,7 @@ class <classname> extends SimpleMigrationStep {
|
||||||
* @since 13.0.0
|
* @since 13.0.0
|
||||||
*/
|
*/
|
||||||
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
||||||
<schemabody>
|
{{schemabody}}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,9 +133,9 @@ class <classname> extends SimpleMigrationStep {
|
||||||
|
|
||||||
|
|
||||||
$placeHolders = [
|
$placeHolders = [
|
||||||
'<namespace>',
|
'{{namespace}}',
|
||||||
'<classname>',
|
'{{classname}}',
|
||||||
'<schemabody>',
|
'{{schemabody}}',
|
||||||
];
|
];
|
||||||
$replacements = [
|
$replacements = [
|
||||||
$ms->getMigrationsNamespace(),
|
$ms->getMigrationsNamespace(),
|
||||||
|
|
Loading…
Reference in New Issue