@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (php_sapi_name() !== 'cli') { |
48 | 48 | parent::init(array_merge(array( |
49 | 49 | 'engine' => 'Xcache', |
50 | - 'prefix' => Inflector::slug(APP_DIR) . '_', |
|
50 | + 'prefix' => Inflector::slug(APP_DIR).'_', |
|
51 | 51 | 'PHP_AUTH_USER' => 'user', |
52 | 52 | 'PHP_AUTH_PW' => 'password' |
53 | 53 | ), $settings) |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function write($key, $value, $duration) { |
69 | 69 | $expires = time() + $duration; |
70 | - xcache_set($key . '_expires', $expires, $duration); |
|
70 | + xcache_set($key.'_expires', $expires, $duration); |
|
71 | 71 | return xcache_set($key, $value, $duration); |
72 | 72 | } |
73 | 73 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | public function read($key) { |
81 | 81 | if (xcache_isset($key)) { |
82 | 82 | $time = time(); |
83 | - $cachetime = intval(xcache_get($key . '_expires')); |
|
83 | + $cachetime = intval(xcache_get($key.'_expires')); |
|
84 | 84 | if ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime) { |
85 | 85 | return false; |
86 | 86 | } |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | public function groups() { |
150 | 150 | $result = array(); |
151 | 151 | foreach ($this->settings['groups'] as $group) { |
152 | - $value = xcache_get($this->settings['prefix'] . $group); |
|
153 | - if (!$value) { |
|
152 | + $value = xcache_get($this->settings['prefix'].$group); |
|
153 | + if ( ! $value) { |
|
154 | 154 | $value = 1; |
155 | - xcache_set($this->settings['prefix'] . $group, $value, 0); |
|
155 | + xcache_set($this->settings['prefix'].$group, $value, 0); |
|
156 | 156 | } |
157 | - $result[] = $group . $value; |
|
157 | + $result[] = $group.$value; |
|
158 | 158 | } |
159 | 159 | return $result; |
160 | 160 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * @return boolean success |
167 | 167 | */ |
168 | 168 | public function clearGroup($group) { |
169 | - return (bool)xcache_inc($this->settings['prefix'] . $group, 1); |
|
169 | + return (bool) xcache_inc($this->settings['prefix'].$group, 1); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
@@ -192,12 +192,12 @@ discard block |
||
192 | 192 | } |
193 | 193 | } else { |
194 | 194 | $value = env($key); |
195 | - if (!empty($value)) { |
|
195 | + if ( ! empty($value)) { |
|
196 | 196 | $backup[$key] = $value; |
197 | 197 | } |
198 | - if (!empty($this->settings[$setting])) { |
|
198 | + if ( ! empty($this->settings[$setting])) { |
|
199 | 199 | $_SERVER[$key] = $this->settings[$setting]; |
200 | - } elseif (!empty($this->settings[$key])) { |
|
200 | + } elseif ( ! empty($this->settings[$key])) { |
|
201 | 201 | $_SERVER[$key] = $this->settings[$key]; |
202 | 202 | } else { |
203 | 203 | $_SERVER[$key] = $value; |
@@ -16,6 +16,6 @@ |
||
16 | 16 | * @license http://www.opensource.org/licenses/mit-license.php MIT License |
17 | 17 | */ |
18 | 18 | |
19 | -$versionFile = file(CAKE . 'VERSION.txt'); |
|
19 | +$versionFile = file(CAKE.'VERSION.txt'); |
|
20 | 20 | $config['Cake.version'] = trim(array_pop($versionFile)); |
21 | 21 | return $config; |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * @param string $path The path to read config files from. Defaults to APP . 'Config' . DS |
40 | 40 | */ |
41 | 41 | public function __construct($path = null) { |
42 | - if (!$path) { |
|
43 | - $path = APP . 'Config' . DS; |
|
42 | + if ( ! $path) { |
|
43 | + $path = APP.'Config'.DS; |
|
44 | 44 | } |
45 | 45 | $this->_path = $path; |
46 | 46 | } |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | $file = $this->_getFilePath($key); |
66 | - if (!is_file($file)) { |
|
66 | + if ( ! is_file($file)) { |
|
67 | 67 | throw new ConfigureException(__d('cake_dev', 'Could not load configuration file: %s', $file)); |
68 | 68 | } |
69 | 69 | |
70 | 70 | include $file; |
71 | - if (!isset($config)) { |
|
71 | + if ( ! isset($config)) { |
|
72 | 72 | throw new ConfigureException(__d('cake_dev', 'No variable %s found in %s', '$config', $file)); |
73 | 73 | } |
74 | 74 | return $config; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @return integer Bytes saved. |
85 | 85 | */ |
86 | 86 | public function dump($key, $data) { |
87 | - $contents = '<?php' . "\n" . '$config = ' . var_export($data, true) . ';'; |
|
87 | + $contents = '<?php'."\n".'$config = '.var_export($data, true).';'; |
|
88 | 88 | |
89 | 89 | $filename = $this->_getFilePath($key); |
90 | 90 | return file_put_contents($filename, $contents); |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | $key .= '.php'; |
106 | 106 | |
107 | 107 | if ($plugin) { |
108 | - $file = App::pluginPath($plugin) . 'Config' . DS . $key; |
|
108 | + $file = App::pluginPath($plugin).'Config'.DS.$key; |
|
109 | 109 | } else { |
110 | - $file = $this->_path . $key; |
|
110 | + $file = $this->_path.$key; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | return $file; |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function initialize() { |
45 | 45 | $this->paths = array_merge($this->paths, array( |
46 | - 'behavior' => CAKE . 'Model' . DS . 'Behavior' . DS, |
|
47 | - 'cache' => CAKE . 'Cache' . DS, |
|
48 | - 'controller' => CAKE . 'Controller' . DS, |
|
49 | - 'component' => CAKE . 'Controller' . DS . 'Component' . DS, |
|
50 | - 'helper' => CAKE . 'View' . DS . 'Helper' . DS, |
|
51 | - 'model' => CAKE . 'Model' . DS, |
|
52 | - 'view' => CAKE . 'View' . DS, |
|
46 | + 'behavior' => CAKE.'Model'.DS.'Behavior'.DS, |
|
47 | + 'cache' => CAKE.'Cache'.DS, |
|
48 | + 'controller' => CAKE.'Controller'.DS, |
|
49 | + 'component' => CAKE.'Controller'.DS.'Component'.DS, |
|
50 | + 'helper' => CAKE.'View'.DS.'Helper'.DS, |
|
51 | + 'model' => CAKE.'Model'.DS, |
|
52 | + 'view' => CAKE.'View'.DS, |
|
53 | 53 | 'core' => CAKE |
54 | 54 | )); |
55 | 55 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $objects = App::objects('class', $path); |
84 | 84 | if (in_array($class, $objects)) { |
85 | 85 | if (in_array($type, array('behavior', 'component', 'helper')) && $type !== $file) { |
86 | - if (!preg_match('/' . Inflector::camelize($type) . '$/', $class)) { |
|
86 | + if ( ! preg_match('/'.Inflector::camelize($type).'$/', $class)) { |
|
87 | 87 | $class .= Inflector::camelize($type); |
88 | 88 | } |
89 | 89 | } |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | $this->error(__d('cake_console', '%s not found', $class)); |
93 | 93 | } |
94 | 94 | |
95 | - $parsed = $this->_parseClass($path . $class . '.php', $class); |
|
95 | + $parsed = $this->_parseClass($path.$class.'.php', $class); |
|
96 | 96 | |
97 | - if (!empty($parsed)) { |
|
97 | + if ( ! empty($parsed)) { |
|
98 | 98 | if (isset($this->params['method'])) { |
99 | - if (!isset($parsed[$this->params['method']])) { |
|
99 | + if ( ! isset($parsed[$this->params['method']])) { |
|
100 | 100 | $this->err(__d('cake_console', '%s::%s() could not be found', $class, $this->params['method'])); |
101 | 101 | return $this->_stop(); |
102 | 102 | } |
103 | 103 | $method = $parsed[$this->params['method']]; |
104 | - $this->out($class . '::' . $method['method'] . $method['parameters']); |
|
104 | + $this->out($class.'::'.$method['method'].$method['parameters']); |
|
105 | 105 | $this->hr(); |
106 | 106 | $this->out($method['comment'], true); |
107 | 107 | } else { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $this->hr(); |
110 | 110 | $i = 0; |
111 | 111 | foreach ($parsed as $method) { |
112 | - $list[] = ++$i . ". " . $method['method'] . $method['parameters']; |
|
112 | + $list[] = ++$i.". ".$method['method'].$method['parameters']; |
|
113 | 113 | } |
114 | 114 | $this->out($list); |
115 | 115 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | if (isset($methods[--$number])) { |
128 | 128 | $method = $parsed[$methods[$number]]; |
129 | 129 | $this->hr(); |
130 | - $this->out($class . '::' . $method['method'] . $method['parameters']); |
|
130 | + $this->out($class.'::'.$method['method'].$method['parameters']); |
|
131 | 131 | $this->hr(); |
132 | 132 | $this->out($method['comment'], true); |
133 | 133 | } |
@@ -165,27 +165,27 @@ discard block |
||
165 | 165 | $head .= "Parameters:\n\n"; |
166 | 166 | |
167 | 167 | $commands = array( |
168 | - 'path' => "\t<type>\n" . |
|
169 | - "\t\tEither a full path or type of class (model, behavior, controller, component, view, helper).\n" . |
|
170 | - "\t\tAvailable values:\n\n" . |
|
171 | - "\t\tbehavior\tLook for class in CakePHP behavior path\n" . |
|
172 | - "\t\tcache\tLook for class in CakePHP cache path\n" . |
|
173 | - "\t\tcontroller\tLook for class in CakePHP controller path\n" . |
|
174 | - "\t\tcomponent\tLook for class in CakePHP component path\n" . |
|
175 | - "\t\thelper\tLook for class in CakePHP helper path\n" . |
|
176 | - "\t\tmodel\tLook for class in CakePHP model path\n" . |
|
168 | + 'path' => "\t<type>\n". |
|
169 | + "\t\tEither a full path or type of class (model, behavior, controller, component, view, helper).\n". |
|
170 | + "\t\tAvailable values:\n\n". |
|
171 | + "\t\tbehavior\tLook for class in CakePHP behavior path\n". |
|
172 | + "\t\tcache\tLook for class in CakePHP cache path\n". |
|
173 | + "\t\tcontroller\tLook for class in CakePHP controller path\n". |
|
174 | + "\t\tcomponent\tLook for class in CakePHP component path\n". |
|
175 | + "\t\thelper\tLook for class in CakePHP helper path\n". |
|
176 | + "\t\tmodel\tLook for class in CakePHP model path\n". |
|
177 | 177 | "\t\tview\tLook for class in CakePHP view path\n", |
178 | - 'className' => "\t<className>\n" . |
|
178 | + 'className' => "\t<className>\n". |
|
179 | 179 | "\t\tA CakePHP core class name (e.g: Component, HtmlHelper).\n" |
180 | 180 | ); |
181 | 181 | |
182 | 182 | $this->out($head); |
183 | - if (!isset($this->args[1])) { |
|
183 | + if ( ! isset($this->args[1])) { |
|
184 | 184 | foreach ($commands as $cmd) { |
185 | 185 | $this->out("{$cmd}\n\n"); |
186 | 186 | } |
187 | 187 | } elseif (isset($commands[strtolower($this->args[1])])) { |
188 | - $this->out($commands[strtolower($this->args[1])] . "\n\n"); |
|
188 | + $this->out($commands[strtolower($this->args[1])]."\n\n"); |
|
189 | 189 | } else { |
190 | 190 | $this->out(__d('cake_console', 'Command %s not found', $this->args[1])); |
191 | 191 | } |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | protected function _parseClass($path, $class) { |
203 | 203 | $parsed = array(); |
204 | 204 | |
205 | - if (!class_exists($class)) { |
|
206 | - if (!include_once $path) { |
|
205 | + if ( ! class_exists($class)) { |
|
206 | + if ( ! include_once $path) { |
|
207 | 207 | $this->err(__d('cake_console', '%s could not be found', $path)); |
208 | 208 | } |
209 | 209 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $reflection = new ReflectionClass($class); |
212 | 212 | |
213 | 213 | foreach ($reflection->getMethods() as $method) { |
214 | - if (!$method->isPublic() || strpos($method->getName(), '_') === 0) { |
|
214 | + if ( ! $method->isPublic() || strpos($method->getName(), '_') === 0) { |
|
215 | 215 | continue; |
216 | 216 | } |
217 | 217 | if ($method->getDeclaringClass()->getName() != $class) { |
@@ -219,16 +219,16 @@ discard block |
||
219 | 219 | } |
220 | 220 | $args = array(); |
221 | 221 | foreach ($method->getParameters() as $param) { |
222 | - $paramString = '$' . $param->getName(); |
|
222 | + $paramString = '$'.$param->getName(); |
|
223 | 223 | if ($param->isDefaultValueAvailable()) { |
224 | - $paramString .= ' = ' . str_replace("\n", '', var_export($param->getDefaultValue(), true)); |
|
224 | + $paramString .= ' = '.str_replace("\n", '', var_export($param->getDefaultValue(), true)); |
|
225 | 225 | } |
226 | 226 | $args[] = $paramString; |
227 | 227 | } |
228 | 228 | $parsed[$method->getName()] = array( |
229 | 229 | 'comment' => str_replace(array('/*', '*/', '*'), '', $method->getDocComment()), |
230 | 230 | 'method' => $method->getName(), |
231 | - 'parameters' => '(' . implode(', ', $args) . ')' |
|
231 | + 'parameters' => '('.implode(', ', $args).')' |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | ksort($parsed); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | Configure::write('Cache.disable', 1); |
60 | 60 | |
61 | 61 | $task = Inflector::classify($this->command); |
62 | - if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) { |
|
62 | + if (isset($this->{$task}) && ! in_array($task, array('Project', 'DbConfig'))) { |
|
63 | 63 | if (isset($this->params['connection'])) { |
64 | 64 | $this->{$task}->connection = $this->params['connection']; |
65 | 65 | } |
@@ -75,16 +75,16 @@ discard block |
||
75 | 75 | * @return mixed |
76 | 76 | */ |
77 | 77 | public function main() { |
78 | - if (!is_dir($this->DbConfig->path)) { |
|
78 | + if ( ! is_dir($this->DbConfig->path)) { |
|
79 | 79 | $path = $this->Project->execute(); |
80 | - if (!empty($path)) { |
|
81 | - $this->DbConfig->path = $path . 'Config' . DS; |
|
80 | + if ( ! empty($path)) { |
|
81 | + $this->DbConfig->path = $path.'Config'.DS; |
|
82 | 82 | } else { |
83 | 83 | return false; |
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | - if (!config('database')) { |
|
87 | + if ( ! config('database')) { |
|
88 | 88 | $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.')); |
89 | 89 | $this->args = null; |
90 | 90 | return $this->DbConfig->execute(); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $this->out('Bake All'); |
142 | 142 | $this->hr(); |
143 | 143 | |
144 | - if (!isset($this->params['connection']) && empty($this->connection)) { |
|
144 | + if ( ! isset($this->params['connection']) && empty($this->connection)) { |
|
145 | 145 | $this->connection = $this->DbConfig->getConfig(); |
146 | 146 | } |
147 | 147 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $this->{$task}->interactive = false; |
156 | 156 | } |
157 | 157 | |
158 | - if (!empty($this->args[0])) { |
|
158 | + if ( ! empty($this->args[0])) { |
|
159 | 159 | $name = $this->args[0]; |
160 | 160 | } |
161 | 161 | |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | $this->Controller->bakeTest($controller); |
189 | 189 | } |
190 | 190 | } |
191 | - App::uses($controller . 'Controller', 'Controller'); |
|
192 | - if (class_exists($controller . 'Controller')) { |
|
191 | + App::uses($controller.'Controller', 'Controller'); |
|
192 | + if (class_exists($controller.'Controller')) { |
|
193 | 193 | $this->View->args = array($name); |
194 | 194 | $this->View->execute(); |
195 | 195 | } |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | public function getOptionParser() { |
211 | 211 | $parser = parent::getOptionParser(); |
212 | 212 | return $parser->description(__d('cake_console', |
213 | - 'The Bake script generates controllers, views and models for your application.' . |
|
214 | - ' If run with no command line arguments, Bake guides the user through the class creation process.' . |
|
213 | + 'The Bake script generates controllers, views and models for your application.'. |
|
214 | + ' If run with no command line arguments, Bake guides the user through the class creation process.'. |
|
215 | 215 | ' You can customize the generation process by telling Bake where different parts of your application are using command line arguments.' |
216 | 216 | ))->addSubcommand('all', array( |
217 | 217 | 'help' => __d('cake_console', 'Bake a complete MVC. optional <name> of a Model'), |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | public function main() { |
44 | 44 | if (empty($this->params['xml'])) { |
45 | 45 | $this->out(__d('cake_console', "<info>Current Paths:</info>"), 2); |
46 | - $this->out(" -app: " . APP_DIR); |
|
47 | - $this->out(" -working: " . rtrim(APP, DS)); |
|
48 | - $this->out(" -root: " . rtrim(ROOT, DS)); |
|
49 | - $this->out(" -core: " . rtrim(CORE_PATH, DS)); |
|
46 | + $this->out(" -app: ".APP_DIR); |
|
47 | + $this->out(" -working: ".rtrim(APP, DS)); |
|
48 | + $this->out(" -root: ".rtrim(ROOT, DS)); |
|
49 | + $this->out(" -core: ".rtrim(CORE_PATH, DS)); |
|
50 | 50 | $this->out(""); |
51 | 51 | $this->out(__d('cake_console', "<info>Changing Paths:</info>"), 2); |
52 | 52 | $this->out(__d('cake_console', "Your working path should be the same as your application path. To change your path use the '-app' param.")); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->_appendShells('app', $appShells, $shellList); |
89 | 89 | |
90 | 90 | foreach ($plugins as $plugin) { |
91 | - $pluginShells = App::objects($plugin . '.Console/Command'); |
|
91 | + $pluginShells = App::objects($plugin.'.Console/Command'); |
|
92 | 92 | $this->_appendShells($plugin, $pluginShells, $shellList); |
93 | 93 | } |
94 | 94 | |
@@ -140,14 +140,14 @@ discard block |
||
140 | 140 | foreach ($commands as $command) { |
141 | 141 | $callable = $command; |
142 | 142 | if (in_array($plugin, $plugins)) { |
143 | - $callable = Inflector::camelize($plugin) . '.' . $command; |
|
143 | + $callable = Inflector::camelize($plugin).'.'.$command; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | $shell = $shells->addChild('shell'); |
147 | 147 | $shell->addAttribute('name', $command); |
148 | 148 | $shell->addAttribute('call_as', $callable); |
149 | 149 | $shell->addAttribute('provider', $plugin); |
150 | - $shell->addAttribute('help', $callable . ' -h'); |
|
150 | + $shell->addAttribute('help', $callable.' -h'); |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | $this->stdout->outputAs(ConsoleOutput::RAW); |
@@ -182,10 +182,10 @@ |
||
182 | 182 | ->epilog($epilog); |
183 | 183 | } |
184 | 184 | /** |
185 | - * Prints the help message |
|
186 | - * |
|
187 | - * @return void |
|
188 | - */ |
|
185 | + * Prints the help message |
|
186 | + * |
|
187 | + * @return void |
|
188 | + */ |
|
189 | 189 | public function help() { |
190 | 190 | $optionParser = $this->getOptionParser(); |
191 | 191 | $this->out($optionParser->epilog()); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $this->out(" - {$model}"); |
96 | 96 | } |
97 | 97 | |
98 | - if (!$this->_loadRoutes()) { |
|
98 | + if ( ! $this->_loadRoutes()) { |
|
99 | 99 | $message = __d( |
100 | 100 | 'cake_console', |
101 | 101 | 'There was an error loading the routes config. Please check that the file exists and contains no errors.' |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function main($command = null) { |
201 | 201 | $this->_finished = false; |
202 | - while (!$this->_finished) { |
|
202 | + while ( ! $this->_finished) { |
|
203 | 203 | if (empty($command)) { |
204 | 204 | $command = trim($this->in('')); |
205 | 205 | } |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * @return void |
439 | 439 | */ |
440 | 440 | protected function _routesReload() { |
441 | - if (!$this->_loadRoutes()) { |
|
441 | + if ( ! $this->_loadRoutes()) { |
|
442 | 442 | return $this->err(__d('cake_console', "There was an error loading the routes config. Please check that the file exists and is free of parse errors.")); |
443 | 443 | } |
444 | 444 | $this->out(__d('cake_console', "Routes configuration reloaded, %d routes connected", count(Router::$routes))); |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | preg_match($this->_methodPatterns[__FUNCTION__], $command, $tmp); |
464 | 464 | |
465 | 465 | //@codingStandardsIgnoreStart |
466 | - if ($url = eval('return array' . $tmp[1] . ';')) { |
|
466 | + if ($url = eval('return array'.$tmp[1].';')) { |
|
467 | 467 | //@codingStandardsIgnoreEnd |
468 | 468 | $this->out(Router::url($url)); |
469 | 469 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | extract(Router::getNamedExpressions()); |
503 | 503 | |
504 | 504 | //@codingStandardsIgnoreStart |
505 | - if (!@include APP . 'Config' . DS . 'routes.php') { |
|
505 | + if ( ! @include APP.'Config'.DS.'routes.php') { |
|
506 | 506 | //@codingStandardsIgnoreEnd |
507 | 507 | return false; |
508 | 508 | } |
@@ -49,8 +49,8 @@ |
||
49 | 49 | $this->dataSource = $this->params['datasource']; |
50 | 50 | } |
51 | 51 | |
52 | - if ($this->command && !in_array($this->command, array('help'))) { |
|
53 | - if (!config('database')) { |
|
52 | + if ($this->command && ! in_array($this->command, array('help'))) { |
|
53 | + if ( ! config('database')) { |
|
54 | 54 | $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.')); |
55 | 55 | return $this->DbConfig->execute(); |
56 | 56 | } |
@@ -81,13 +81,13 @@ discard block |
||
81 | 81 | * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::startup |
82 | 82 | */ |
83 | 83 | public function startup() { |
84 | - if (!empty($this->params['host'])) { |
|
84 | + if ( ! empty($this->params['host'])) { |
|
85 | 85 | $this->_host = $this->params['host']; |
86 | 86 | } |
87 | - if (!empty($this->params['port'])) { |
|
87 | + if ( ! empty($this->params['port'])) { |
|
88 | 88 | $this->_port = $this->params['port']; |
89 | 89 | } |
90 | - if (!empty($this->params['document_root'])) { |
|
90 | + if ( ! empty($this->params['document_root'])) { |
|
91 | 91 | $this->_documentRoot = $this->params['document_root']; |
92 | 92 | } |
93 | 93 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->_documentRoot = substr($this->_documentRoot, 0, strlen($this->_documentRoot) - 1); |
97 | 97 | } |
98 | 98 | if (preg_match("/^([a-z]:)[\\\]+(.+)$/i", $this->_documentRoot, $m)) { |
99 | - $this->_documentRoot = $m[1] . '\\' . $m[2]; |
|
99 | + $this->_documentRoot = $m[1].'\\'.$m[2]; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | parent::startup(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function _welcome() { |
111 | 111 | $this->out(); |
112 | - $this->out(__d('cake_console', '<info>Welcome to CakePHP %s Console</info>', 'v' . Configure::version())); |
|
112 | + $this->out(__d('cake_console', '<info>Welcome to CakePHP %s Console</info>', 'v'.Configure::version())); |
|
113 | 113 | $this->hr(); |
114 | 114 | $this->out(__d('cake_console', 'App : %s', APP_DIR)); |
115 | 115 | $this->out(__d('cake_console', 'Path: %s', APP)); |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | $this->_host, |
133 | 133 | $this->_port, |
134 | 134 | escapeshellarg($this->_documentRoot), |
135 | - escapeshellarg($this->_documentRoot . '/index.php') |
|
135 | + escapeshellarg($this->_documentRoot.'/index.php') |
|
136 | 136 | ); |
137 | 137 | |
138 | - $port = ($this->_port == self::DEFAULT_PORT) ? '' : ':' . $this->_port; |
|
138 | + $port = ($this->_port == self::DEFAULT_PORT) ? '' : ':'.$this->_port; |
|
139 | 139 | $this->out(__d('cake_console', 'built-in server is running in http://%s%s/', $this->_host, $port)); |
140 | 140 | system($command); |
141 | 141 | } |