| @@ -84,7 +84,7 @@ discard block | ||
| 84 | 84 |      { | 
| 85 | 85 |          $fileName = ucfirst($input->getArgument('name')); | 
| 86 | 86 | |
| 87 | - $path = APPPATH . 'models' . DIRECTORY_SEPARATOR . $fileName . '.php'; | |
| 87 | + $path = APPPATH.'models'.DIRECTORY_SEPARATOR.$fileName.'.php'; | |
| 88 | 88 | |
| 89 | 89 | $fileInformation = [ | 
| 90 | 90 | 'name' => $fileName, | 
| @@ -102,7 +102,7 @@ discard block | ||
| 102 | 102 |          if ($validator->fails()) { | 
| 103 | 103 | $message = $validator->getMessage(); | 
| 104 | 104 | |
| 105 | -            return $output->writeln('<error>' . $message . '</error>'); | |
| 105 | +            return $output->writeln('<error>'.$message.'</error>'); | |
| 106 | 106 | } | 
| 107 | 107 | |
| 108 | 108 | $data = [ | 
| @@ -116,12 +116,12 @@ discard block | ||
| 116 | 116 | |
| 117 | 117 | $result = $generator->generate(); | 
| 118 | 118 |          $model = $this->renderer->render('Model.template', $result); | 
| 119 | - $message = 'The model "' . $fileName . '" has been created successfully!'; | |
| 119 | + $message = 'The model "'.$fileName.'" has been created successfully!'; | |
| 120 | 120 | |
| 121 | 121 | $file = fopen($path, 'wb'); | 
| 122 | 122 | file_put_contents($path, $model); | 
| 123 | 123 | fclose($file); | 
| 124 | 124 | |
| 125 | -        return $output->writeln('<info>' . $message . '</info>'); | |
| 125 | +        return $output->writeln('<info>'.$message.'</info>'); | |
| 126 | 126 | } | 
| 127 | 127 | } | 
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 |              $fileName = ucfirst(Inflector::plural($input->getArgument('name'))); | 
| 93 | 93 | } | 
| 94 | 94 | |
| 95 | - $path = APPPATH . 'controllers' . DIRECTORY_SEPARATOR . $fileName . '.php'; | |
| 95 | + $path = APPPATH.'controllers'.DIRECTORY_SEPARATOR.$fileName.'.php'; | |
| 96 | 96 | |
| 97 | 97 | $fileInformation = [ | 
| 98 | 98 | 'name' => $fileName, | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 |          if ($validator->fails()) { | 
| 111 | 111 | $message = $validator->getMessage(); | 
| 112 | 112 | |
| 113 | -            return $output->writeln('<error>' . $message . '</error>'); | |
| 113 | +            return $output->writeln('<error>'.$message.'</error>'); | |
| 114 | 114 | } | 
| 115 | 115 | |
| 116 | 116 | $data = [ | 
| @@ -125,12 +125,12 @@ discard block | ||
| 125 | 125 | |
| 126 | 126 | $result = $generator->generate(); | 
| 127 | 127 |          $controller = $this->renderer->render('Controller.template', $result); | 
| 128 | - $message = 'The controller "' . $fileName . '" has been created successfully!'; | |
| 128 | + $message = 'The controller "'.$fileName.'" has been created successfully!'; | |
| 129 | 129 | |
| 130 | 130 | $file = fopen($path, 'wb'); | 
| 131 | 131 | file_put_contents($path, $controller); | 
| 132 | 132 | fclose($file); | 
| 133 | 133 | |
| 134 | -        return $output->writeln('<info>' . $message . '</info>'); | |
| 134 | +        return $output->writeln('<info>'.$message.'</info>'); | |
| 135 | 135 | } | 
| 136 | 136 | } | 
| @@ -63,8 +63,8 @@ discard block | ||
| 63 | 63 | */ | 
| 64 | 64 | public function fails() | 
| 65 | 65 |      { | 
| 66 | - $hasDoctrine = file_exists(APPPATH . 'libraries/Doctrine.php'); | |
| 67 | - $hasWildfire = file_exists(APPPATH . 'libraries/Wildfire.php'); | |
| 66 | + $hasDoctrine = file_exists(APPPATH.'libraries/Doctrine.php'); | |
| 67 | + $hasWildfire = file_exists(APPPATH.'libraries/Wildfire.php'); | |
| 68 | 68 | |
| 69 | 69 |          if ( ! $hasWildfire && ! $hasDoctrine) { | 
| 70 | 70 | $this->message = 'Please install Wildfire or Doctrine!'; | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | $name = $this->file['name']; | 
| 83 | 83 | $type = $this->file['type']; | 
| 84 | 84 | |
| 85 | - $this->message = 'The "' . $name . '" ' . $type . ' already exists!'; | |
| 85 | + $this->message = 'The "'.$name.'" '.$type.' already exists!'; | |
| 86 | 86 | |
| 87 | 87 | return true; | 
| 88 | 88 | } | 
| @@ -13,11 +13,11 @@ discard block | ||
| 13 | 13 |  $app->console->setVersion('1.2.0'); | 
| 14 | 14 | |
| 15 | 15 | $app | 
| 16 | - ->setTemplatePath(__DIR__ . '/../src/Templates') | |
| 17 | - ->setCommandPath(__DIR__ . '/../src/Commands') | |
| 16 | + ->setTemplatePath(__DIR__.'/../src/Templates') | |
| 17 | + ->setCommandPath(__DIR__.'/../src/Commands') | |
| 18 | 18 |      ->setCommandNamespace('Rougin\Combustor\Commands'); | 
| 19 | 19 | |
| 20 | -$app->injector->delegate('CI_Controller', function () { | |
| 20 | +$app->injector->delegate('CI_Controller', function() { | |
| 21 | 21 | $sparkPlug = new Rougin\SparkPlug\SparkPlug($GLOBALS, $_SERVER); | 
| 22 | 22 | |
| 23 | 23 | return $sparkPlug->getCodeIgniter(); | 
| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 | |
| 26 | 26 |  $ci = $app->injector->make('CI_Controller'); | 
| 27 | 27 | |
| 28 | -$app->injector->delegate('Rougin\Describe\Describe', function () use ($ci) { | |
| 28 | +$app->injector->delegate('Rougin\Describe\Describe', function() use ($ci) { | |
| 29 | 29 | $ci->load->database(); | 
| 30 | 30 | |
| 31 | 31 | $config['default'] = [ | 
| @@ -37,10 +37,10 @@ | ||
| 37 | 37 | */ | 
| 38 | 38 | public function fails() | 
| 39 | 39 |      { | 
| 40 | - $filePath = APPPATH . 'views/' . $this->name; | |
| 40 | + $filePath = APPPATH.'views/'.$this->name; | |
| 41 | 41 | |
| 42 | 42 |          if ( ! @mkdir($filePath, 0775, true)) { | 
| 43 | - $this->message = 'The "' . $this->name . '" views folder already exists!'; | |
| 43 | + $this->message = 'The "'.$this->name.'" views folder already exists!'; | |
| 44 | 44 | |
| 45 | 45 | return true; | 
| 46 | 46 | } | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | $field = strtolower($column->getField()); | 
| 54 | - $method = 'set_' . $field; | |
| 54 | + $method = 'set_'.$field; | |
| 55 | 55 | |
| 56 | 56 | $this->data['camel'][$field] = lcfirst(camelize($method)); | 
| 57 | 57 | $this->data['underscore'][$field] = underscore($method); | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | $data['plural'] = plural($data['name']); | 
| 45 | 45 | $data['singular'] = singular($data['name']); | 
| 46 | 46 | |
| 47 | - $primaryKey = 'get_' . $this->describe->getPrimaryKey($data['name']); | |
| 47 | + $primaryKey = 'get_'.$this->describe->getPrimaryKey($data['name']); | |
| 48 | 48 | $data['primaryKey'] = $primaryKey; | 
| 49 | 49 | |
| 50 | 50 |          if ($this->data['isCamel']) { | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | |
| 86 | 86 | $this->data['foreignKeys'][$field] = plural($referencedTable); | 
| 87 | 87 | |
| 88 | - $singular = $field . '_singular'; | |
| 88 | + $singular = $field.'_singular'; | |
| 89 | 89 | |
| 90 | 90 | $this->data['foreignKeys'][$singular] = singular( | 
| 91 | 91 | $referencedTable | 
| @@ -42,7 +42,7 @@ discard block | ||
| 42 | 42 | */ | 
| 43 | 43 | protected function getPrimaryKey(array $data, $field, $referencedTable) | 
| 44 | 44 |      { | 
| 45 | - $accessor = 'get_' . $this->describe->getPrimaryKey($referencedTable); | |
| 45 | + $accessor = 'get_'.$this->describe->getPrimaryKey($referencedTable); | |
| 46 | 46 | |
| 47 | 47 | $data['primaryKeys'][$field] = $accessor; | 
| 48 | 48 | |
| @@ -67,15 +67,15 @@ discard block | ||
| 67 | 67 |          if ($type == 'camelize') { | 
| 68 | 68 | return [ | 
| 69 | 69 | 'field' => lcfirst(camelize($field)), | 
| 70 | -                'accessor' => lcfirst(camelize('get_' . $field)), | |
| 71 | -                'mutator' => lcfirst(camelize('set_' . $field)) | |
| 70 | +                'accessor' => lcfirst(camelize('get_'.$field)), | |
| 71 | +                'mutator' => lcfirst(camelize('set_'.$field)) | |
| 72 | 72 | ]; | 
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | return [ | 
| 76 | 76 | 'field' => lcfirst(underscore($field)), | 
| 77 | -            'accessor' => lcfirst(underscore('get_' . $field)), | |
| 78 | -            'mutator' => lcfirst(underscore('set_' . $field)) | |
| 77 | +            'accessor' => lcfirst(underscore('get_'.$field)), | |
| 78 | +            'mutator' => lcfirst(underscore('set_'.$field)) | |
| 79 | 79 | ]; | 
| 80 | 80 | } | 
| 81 | 81 | } | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 |          $this->addLibrary('wildfire'); | 
| 37 | 37 | |
| 38 | 38 |          $template = $this->renderer->render('Libraries/Wildfire.template'); | 
| 39 | - $wildfire = new File(APPPATH . 'libraries/Wildfire.php'); | |
| 39 | + $wildfire = new File(APPPATH.'libraries/Wildfire.php'); | |
| 40 | 40 | |
| 41 | 41 | $wildfire->putContents($template); | 
| 42 | 42 | $wildfire->close(); | 
| @@ -45,6 +45,6 @@ discard block | ||
| 45 | 45 | |
| 46 | 46 | $message = 'Wildfire is now installed successfully!'; | 
| 47 | 47 | |
| 48 | -        return $output->writeln('<info>' . $message . '</info>'); | |
| 48 | +        return $output->writeln('<info>'.$message.'</info>'); | |
| 49 | 49 | } | 
| 50 | 50 | } |