use template placeholders instead of html

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-07-19 13:23:14 +02:00
parent e023899078
commit 087138f228
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8

View file

@ -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(),