| @@ -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 | } | 
| @@ -59,7 +59,7 @@ | ||
| 59 | 59 | |
| 60 | 60 | array_push($this->data['indexes'], $field); | 
| 61 | 61 | |
| 62 | - $this->data['primaryKeys'][$field] = 'get_' . | |
| 62 | + $this->data['primaryKeys'][$field] = 'get_'. | |
| 63 | 63 | $this->describe->getPrimaryKey( | 
| 64 | 64 | $column->getReferencedTable() | 
| 65 | 65 | ); | 
| @@ -103,13 +103,13 @@ | ||
| 103 | 103 | $referencedTable | 
| 104 | 104 | ); | 
| 105 | 105 | |
| 106 | - $singular = $field . '_singular'; | |
| 106 | + $singular = $field.'_singular'; | |
| 107 | 107 | |
| 108 | 108 | $this->data['foreignKeys'][$singular] = Inflector::singular( | 
| 109 | 109 | $referencedTable | 
| 110 | 110 | ); | 
| 111 | 111 | |
| 112 | - $this->data['primaryKeys'][$field] = 'get_' . | |
| 112 | + $this->data['primaryKeys'][$field] = 'get_'. | |
| 113 | 113 | $this->describe->getPrimaryKey($referencedTable); | 
| 114 | 114 | |
| 115 | 115 |                  if ($this->data['isCamel']) { | 
| @@ -45,15 +45,15 @@ | ||
| 45 | 45 |          if ($type == 'camelize') { | 
| 46 | 46 | return [ | 
| 47 | 47 | 'field' => lcfirst(Inflector::camelize($field)), | 
| 48 | -                'accessor' => lcfirst(Inflector::camelize('set_' . $field)), | |
| 49 | -                'mutator' => lcfirst(Inflector::camelize('get_' . $field)) | |
| 48 | +                'accessor' => lcfirst(Inflector::camelize('set_'.$field)), | |
| 49 | +                'mutator' => lcfirst(Inflector::camelize('get_'.$field)) | |
| 50 | 50 | ]; | 
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | return [ | 
| 54 | 54 | 'field' => lcfirst(Inflector::underscore($field)), | 
| 55 | -            'accessor' => lcfirst(Inflector::underscore('set_' . $field)), | |
| 56 | -            'mutator' => lcfirst(Inflector::underscore('get_' . $field)) | |
| 55 | +            'accessor' => lcfirst(Inflector::underscore('set_'.$field)), | |
| 56 | +            'mutator' => lcfirst(Inflector::underscore('get_'.$field)) | |
| 57 | 57 | ]; | 
| 58 | 58 | } | 
| 59 | 59 | } | 
| @@ -42,18 +42,18 @@ discard block | ||
| 42 | 42 | * library and creates a "proxies" directory for lazy loading. | 
| 43 | 43 | */ | 
| 44 | 44 | |
| 45 | -        file_put_contents(realpath('vendor') . '/bin/doctrine.php', $cli); | |
| 46 | -        file_put_contents(realpath('vendor') . '/doctrine/orm/bin/doctrine.php', $cli); | |
| 45 | +        file_put_contents(realpath('vendor').'/bin/doctrine.php', $cli); | |
| 46 | +        file_put_contents(realpath('vendor').'/doctrine/orm/bin/doctrine.php', $cli); | |
| 47 | 47 | |
| 48 | - $file = fopen(APPPATH . 'libraries/Doctrine.php', 'wb'); | |
| 49 | - file_put_contents(APPPATH . 'libraries/Doctrine.php', $library); | |
| 48 | + $file = fopen(APPPATH.'libraries/Doctrine.php', 'wb'); | |
| 49 | + file_put_contents(APPPATH.'libraries/Doctrine.php', $library); | |
| 50 | 50 | fclose($file); | 
| 51 | 51 | |
| 52 | 52 |          $this->addLibrary('doctrine'); | 
| 53 | 53 | |
| 54 | -        if ( ! is_dir(APPPATH . 'models/proxies')) { | |
| 55 | - mkdir(APPPATH . 'models/proxies'); | |
| 56 | - chmod(APPPATH . 'models/proxies', 0777); | |
| 54 | +        if ( ! is_dir(APPPATH.'models/proxies')) { | |
| 55 | + mkdir(APPPATH.'models/proxies'); | |
| 56 | + chmod(APPPATH.'models/proxies', 0777); | |
| 57 | 57 | } | 
| 58 | 58 | |
| 59 | 59 | /* | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 | |
| 63 | 63 | $abstractCommand = file_get_contents( | 
| 64 | -            realpath('vendor') . '/' . | |
| 64 | +            realpath('vendor').'/'. | |
| 65 | 65 | 'doctrine/orm/lib/Doctrine/'. | 
| 66 | 66 | 'ORM/Tools/Console/Command/'. | 
| 67 | 67 | 'SchemaTool/AbstractCommand.php' | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | file_put_contents( | 
| 84 | -            realpath('vendor') . '/' . | |
| 84 | +            realpath('vendor').'/'. | |
| 85 | 85 | 'doctrine/orm/lib/Doctrine/'. | 
| 86 | 86 | 'ORM/Tools/Console/Command/'. | 
| 87 | 87 | 'SchemaTool/AbstractCommand.php', | 
| @@ -92,6 +92,6 @@ discard block | ||
| 92 | 92 | |
| 93 | 93 | $message = 'Doctrine ORM is now installed successfully!'; | 
| 94 | 94 | |
| 95 | -        return $output->writeln('<info>' . $message . '</info>'); | |
| 95 | +        return $output->writeln('<info>'.$message.'</info>'); | |
| 96 | 96 | } | 
| 97 | 97 | } | 
| @@ -34,16 +34,16 @@ | ||
| 34 | 34 |      { | 
| 35 | 35 |          $this->addLibrary('wildfire'); | 
| 36 | 36 | |
| 37 | - $file = fopen(APPPATH . 'libraries/Wildfire.php', 'wb'); | |
| 37 | + $file = fopen(APPPATH.'libraries/Wildfire.php', 'wb'); | |
| 38 | 38 |          $wildfire = $this->renderer->render('Libraries/Wildfire.template'); | 
| 39 | 39 | |
| 40 | - file_put_contents(APPPATH . 'libraries/Wildfire.php', $wildfire); | |
| 40 | + file_put_contents(APPPATH.'libraries/Wildfire.php', $wildfire); | |
| 41 | 41 | fclose($file); | 
| 42 | 42 | |
| 43 | 43 | Tools::ignite(); | 
| 44 | 44 | |
| 45 | 45 | $message = 'Wildfire is now installed successfully!'; | 
| 46 | 46 | |
| 47 | -        return $output->writeln('<info>' . $message . '</info>'); | |
| 47 | +        return $output->writeln('<info>'.$message.'</info>'); | |
| 48 | 48 | } | 
| 49 | 49 | } | 
| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 |      { | 
| 36 | 36 | $library = ucfirst($this->library); | 
| 37 | 37 | |
| 38 | - return ! file_exists(APPPATH . 'libraries/' . $library . '.php'); | |
| 38 | + return ! file_exists(APPPATH.'libraries/'.$library.'.php'); | |
| 39 | 39 | } | 
| 40 | 40 | |
| 41 | 41 | /** | 
| @@ -46,8 +46,8 @@ discard block | ||
| 46 | 46 | protected function configure() | 
| 47 | 47 |      { | 
| 48 | 48 | $this | 
| 49 | -            ->setName('install:' . $this->library) | |
| 50 | -            ->setDescription('Installs ' . ucfirst($this->library)); | |
| 49 | +            ->setName('install:'.$this->library) | |
| 50 | +            ->setDescription('Installs '.ucfirst($this->library)); | |
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | /** | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | */ | 
| 59 | 59 | protected function addLibrary($library) | 
| 60 | 60 |      { | 
| 61 | - $autoload = file_get_contents(APPPATH . 'config/autoload.php'); | |
| 61 | + $autoload = file_get_contents(APPPATH.'config/autoload.php'); | |
| 62 | 62 | $lines = explode(PHP_EOL, $autoload); | 
| 63 | 63 | |
| 64 | 64 | $pattern = '/\$autoload\[\'libraries\'\] = array\((.*?)\)/'; | 
| @@ -67,17 +67,17 @@ discard block | ||
| 67 | 67 | |
| 68 | 68 |          $libraries = explode(', ', end($match[1])); | 
| 69 | 69 | |
| 70 | -        if ( ! in_array('\'' . $library . '\'', $libraries)) { | |
| 71 | - array_push($libraries, '\'' . $library . '\''); | |
| 70 | +        if ( ! in_array('\''.$library.'\'', $libraries)) { | |
| 71 | + array_push($libraries, '\''.$library.'\''); | |
| 72 | 72 | |
| 73 | 73 | $libraries = array_filter($libraries); | 
| 74 | 74 | |
| 75 | 75 | $pattern = '/\$autoload\[\'libraries\'\] = array\([^)]*\);/'; | 
| 76 | -            $replacement = '$autoload[\'libraries\'] = array(' . implode(', ', $libraries) . ');'; | |
| 76 | +            $replacement = '$autoload[\'libraries\'] = array('.implode(', ', $libraries).');'; | |
| 77 | 77 | |
| 78 | 78 | $lines[60] = preg_replace($pattern, $replacement, $lines[60]); | 
| 79 | 79 | |
| 80 | - file_put_contents(APPPATH . 'config/autoload.php', implode(PHP_EOL, $lines)); | |
| 80 | + file_put_contents(APPPATH.'config/autoload.php', implode(PHP_EOL, $lines)); | |
| 81 | 81 | } | 
| 82 | 82 | } | 
| 83 | 83 | } |