From 027c5ce4584e97df9ed6cc2494b012c87e53d9ec Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Fri, 14 Apr 2017 16:34:12 +0300 Subject: [PATCH 1/2] Fixed codestyle --- src/Command/Db/AbstractDbCommand.php | 2 +- src/Command/Module/InstallCommand.php | 2 +- src/Command/Module/RemoveCommand.php | 2 +- src/Command/TestCommand.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Command/Db/AbstractDbCommand.php b/src/Command/Db/AbstractDbCommand.php index bda48a2..50905a0 100644 --- a/src/Command/Db/AbstractDbCommand.php +++ b/src/Command/Db/AbstractDbCommand.php @@ -42,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $phinxArguments['command'] = $commandName; - $phinxArguments['--configuration'] = PATH_APPLICATION . DS . 'configs' . DS . 'phinx.php'; + $phinxArguments['--configuration'] = PATH_APPLICATION .DS. 'configs' .DS. 'phinx.php'; if ($command->getDefinition()->hasOption('environment')) { $phinxArguments['--environment'] = 'default'; diff --git a/src/Command/Module/InstallCommand.php b/src/Command/Module/InstallCommand.php index 216958c..6931193 100644 --- a/src/Command/Module/InstallCommand.php +++ b/src/Command/Module/InstallCommand.php @@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $arguments = [ 'command' => 'require', - 'packages' => ['bluzphp/module-' . $input->getArgument('module')] + 'packages' => ['bluzphp/module-'. $input->getArgument('module')] ]; // call `composer install` command programmatically diff --git a/src/Command/Module/RemoveCommand.php b/src/Command/Module/RemoveCommand.php index f3c7454..ff79abe 100644 --- a/src/Command/Module/RemoveCommand.php +++ b/src/Command/Module/RemoveCommand.php @@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $arguments = [ 'command' => 'remove', - 'packages' => ['bluzphp/module-' . $input->getArgument('module')] + 'packages' => ['bluzphp/module-'. $input->getArgument('module')] ]; // call `composer install` command programmatically diff --git a/src/Command/TestCommand.php b/src/Command/TestCommand.php index c18e22d..88beb02 100644 --- a/src/Command/TestCommand.php +++ b/src/Command/TestCommand.php @@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output) // call `codeception run` command programmatically $arguments = [ 'run', - '--config ' . PATH_ROOT . DS . 'codeception.yml' + '--config '. PATH_ROOT .DS. 'codeception.yml' ]; if ($group = $input->getArgument('module')) { @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output) protected function getCodeceptionApplication() { // @todo need refactoring this part - move functions to separate files - require_once PATH_VENDOR . DS . 'codeception' . DS . 'codeception' . DS . 'autoload.php'; + require_once PATH_VENDOR .DS. 'codeception' .DS. 'codeception' .DS. 'autoload.php'; $app = new Codeception\Application('Codeception', Codeception\Codecept::VERSION); $app->add(new Codeception\Command\Run('run')); From b4be854dd35ddc2f71e58b1400014078b06e2f5e Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Thu, 20 Jul 2017 11:57:36 +0300 Subject: [PATCH 2/2] Prepare for framework 7.6.1 --- src/Generator/views/controllers/crud.phtml | 4 +--- src/Generator/views/controllers/rest.phtml | 4 +--- tests/Generator/samples/rest.html | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Generator/views/controllers/crud.phtml b/src/Generator/views/controllers/crud.phtml index 86b90ee..24c66d4 100644 --- a/src/Generator/views/controllers/crud.phtml +++ b/src/Generator/views/controllers/crud.phtml @@ -26,9 +26,7 @@ return function () { /** * @var Controller $this */ - $crud = new Crud(); - - $crud->setCrud(\Crud::getInstance()); + $crud = new Crud(\Crud::getInstance()); $crud->get('system', 'crud/get'); $crud->post('system', 'crud/post'); diff --git a/src/Generator/views/controllers/rest.phtml b/src/Generator/views/controllers/rest.phtml index 450823d..09686db 100644 --- a/src/Generator/views/controllers/rest.phtml +++ b/src/Generator/views/controllers/rest.phtml @@ -30,9 +30,7 @@ return function () { /** * @var Controller $this */ - $rest = new Rest(); - - $rest->setCrud(\Crud::getInstance()); + $rest = new Rest(\Crud::getInstance()); $rest->head('system', 'rest/head', 'Read'); $rest->get('system', 'rest/get', 'Read'); diff --git a/tests/Generator/samples/rest.html b/tests/Generator/samples/rest.html index 5075427..373720d 100644 --- a/tests/Generator/samples/rest.html +++ b/tests/Generator/samples/rest.html @@ -29,9 +29,7 @@ /** * @var Controller $this */ - $rest = new Rest(); - - $rest->setCrud(Users\Crud::getInstance()); + $rest = new Rest(Users\Crud::getInstance()); $rest->head('system', 'rest/head', 'Read'); $rest->get('system', 'rest/get', 'Read');