@@ -83,7 +83,7 @@ |
||
| 83 | 83 | $tableInformation = $this->describe->getTable($tableName); |
| 84 | 84 | |
| 85 | 85 | if (empty($tableInformation)) { |
| 86 | - throw new TableNotFoundException('"' . $tableName . '" table not found in database!'); |
|
| 86 | + throw new TableNotFoundException('"'.$tableName.'" table not found in database!'); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $tableInformation; |
@@ -2,14 +2,14 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | require 'vendor/autoload.php'; |
| 4 | 4 | |
| 5 | -$codeigniter = Rougin\SparkPlug\Instance::create(__DIR__ . '/../build'); |
|
| 5 | +$codeigniter = Rougin\SparkPlug\Instance::create(__DIR__.'/../build'); |
|
| 6 | 6 | |
| 7 | -require APPPATH . 'config/database.php'; |
|
| 7 | +require APPPATH.'config/database.php'; |
|
| 8 | 8 | |
| 9 | 9 | if (file_exists('vendor/rougin/codeigniter/src/helpers/inflector_helper.php')) { |
| 10 | 10 | require 'vendor/rougin/codeigniter/src/helpers/inflector_helper.php'; |
| 11 | 11 | } else { |
| 12 | - require BASEPATH . 'helpers/inflector_helper.php'; |
|
| 12 | + require BASEPATH.'helpers/inflector_helper.php'; |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | $driver = new Rougin\Describe\Driver\CodeIgniterDriver($db[$active_group]); |
@@ -18,13 +18,13 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $injector->share($codeigniter)->share($describe); |
| 20 | 20 | |
| 21 | -$combustor = Rougin\Blueprint\Console::boot('combustor.yml', $injector, __DIR__ . '/../build'); |
|
| 21 | +$combustor = Rougin\Blueprint\Console::boot('combustor.yml', $injector, __DIR__.'/../build'); |
|
| 22 | 22 | |
| 23 | 23 | $converter = new Avro\CaseBundle\Util\CaseConverter; |
| 24 | 24 | $extension = new Avro\CaseBundle\Twig\Extension\CaseExtension($converter); |
| 25 | 25 | $template = $combustor->getTemplatePath(); |
| 26 | 26 | |
| 27 | -$combustor->setTemplatePath($template, null, [ $extension ]); |
|
| 27 | +$combustor->setTemplatePath($template, null, [$extension]); |
|
| 28 | 28 | |
| 29 | 29 | $combustor->console->setName('Combustor'); |
| 30 | 30 | $combustor->console->setVersion('2.0.0'); |
@@ -45,17 +45,17 @@ |
||
| 45 | 45 | $contents = (new DataGenerator($this->describe, $input))->generate(); |
| 46 | 46 | $converter = $this->renderer->getExtension('CaseExtension'); |
| 47 | 47 | $filename = $converter->toUnderscoreCase($input->getArgument('table')); |
| 48 | - $directory = 'application/views/' . strtolower(plural($filename)); |
|
| 48 | + $directory = 'application/views/'.strtolower(plural($filename)); |
|
| 49 | 49 | |
| 50 | 50 | $create = $this->renderer->render('Views/Create.twig', $contents); |
| 51 | 51 | $edit = $this->renderer->render('Views/Edit.twig', $contents); |
| 52 | 52 | $index = $this->renderer->render('Views/Index.twig', $contents); |
| 53 | 53 | $show = $this->renderer->render('Views/Show.twig', $contents); |
| 54 | 54 | |
| 55 | - $this->filesystem->write($directory . '/create.php', $create); |
|
| 56 | - $this->filesystem->write($directory . '/edit.php', $edit); |
|
| 57 | - $this->filesystem->write($directory . '/index.php', $index); |
|
| 58 | - $this->filesystem->write($directory . '/show.php', $show); |
|
| 55 | + $this->filesystem->write($directory.'/create.php', $create); |
|
| 56 | + $this->filesystem->write($directory.'/edit.php', $edit); |
|
| 57 | + $this->filesystem->write($directory.'/index.php', $index); |
|
| 58 | + $this->filesystem->write($directory.'/show.php', $show); |
|
| 59 | 59 | |
| 60 | 60 | $output->writeln('<info>Views created successfully!</info>'); |
| 61 | 61 | } |
@@ -55,9 +55,9 @@ |
||
| 55 | 55 | $contents = (new DataGenerator($this->describe, $input))->generate(); |
| 56 | 56 | $converter = $this->renderer->getExtension('CaseExtension'); |
| 57 | 57 | $filename = $converter->toUnderscoreCase($input->getArgument('table')); |
| 58 | - $rendered = $this->renderer->render($modelType . '.twig', $contents); |
|
| 58 | + $rendered = $this->renderer->render($modelType.'.twig', $contents); |
|
| 59 | 59 | |
| 60 | - $this->filesystem->write('application/models/' . ucfirst(singular($filename)) . '.php', $rendered); |
|
| 60 | + $this->filesystem->write('application/models/'.ucfirst(singular($filename)).'.php', $rendered); |
|
| 61 | 61 | |
| 62 | 62 | $output->writeln('<info>Model created successfully!</info>'); |
| 63 | 63 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $filename = $converter->toUnderscoreCase($input->getArgument('table')); |
| 48 | 48 | $rendered = $this->renderer->render('Controller.twig', $contents); |
| 49 | 49 | |
| 50 | - $this->filesystem->write('application/controllers/' . ucfirst(plural($filename)) . '.php', $rendered); |
|
| 50 | + $this->filesystem->write('application/controllers/'.ucfirst(plural($filename)).'.php', $rendered); |
|
| 51 | 51 | |
| 52 | 52 | $output->writeln('<info>Controller created successfully!</info>'); |
| 53 | 53 | } |