@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $dispatcher->signal('kernel.boot', ['injector' => $inject]); |
| 92 | 92 | |
| 93 | 93 | // Hack - killer application |
| 94 | - (new DispatcherInjector)->build()->addListener('kernel.kill', function () { |
|
| 94 | + (new DispatcherInjector)->build()->addListener('kernel.kill', function() { |
|
| 95 | 95 | $params = (new RequestInjector)->build()->getServerParams(); |
| 96 | 96 | $isAjax = strtolower( |
| 97 | 97 | filter_var(!empty($params['HTTP_X_REQUESTED_WITH']) ? $params['HTTP_X_REQUESTED_WITH'] : null) |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function getConfig() |
| 118 | 118 | { |
| 119 | - return $this->getAppDir() . '/configs/index.php'; |
|
| 119 | + return $this->getAppDir().'/configs/index.php'; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | public function getCacheDir() |
| 167 | 167 | { |
| 168 | - return $this->getAppDir() . '/cache/' . $this->getEnvironment(); |
|
| 168 | + return $this->getAppDir().'/cache/'.$this->getEnvironment(); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -178,6 +178,6 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | public function getLogDir() |
| 180 | 180 | { |
| 181 | - return $this->getAppDir() . '/logs'; |
|
| 181 | + return $this->getAppDir().'/logs'; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | \ No newline at end of file |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | */ |
| 122 | 122 | public function send(ResponseInterface $response) |
| 123 | 123 | { |
| 124 | - printf($response->getBody() . PHP_EOL); |
|
| 124 | + printf($response->getBody().PHP_EOL); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | |
| 68 | 68 | $this->hash = md5($this->sourcePath); |
| 69 | 69 | |
| 70 | - $this->publishPath = '/' . (($dir = (new InjectorInterface)->param('assetsDirName')) ? $dir : 'assets') . '/' . $this->hash; |
|
| 70 | + $this->publishPath = '/'.(($dir = (new InjectorInterface)->param('assetsDirName')) ? $dir : 'assets').'/'.$this->hash; |
|
| 71 | 71 | |
| 72 | 72 | $web = (new KernelInjector)->build()->getWebDir(); |
| 73 | 73 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | public static function finder(IQuery $query = null, $single = false) |
| 108 | 108 | { |
| 109 | 109 | $query = ($query instanceof Query) ? $query : new Query((new ConnectionInjector)->build()); |
| 110 | - $query->table = static::$tableName . ' m'; |
|
| 110 | + $query->table = static::$tableName.' m'; |
|
| 111 | 111 | $query->objectName = get_called_class(); |
| 112 | 112 | $query->single = $single; |
| 113 | 113 | |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | $sql = new Query((new ConnectionInjector)->build()); |
| 166 | 166 | |
| 167 | 167 | if ((new ConnectionInjector)->build()->getDriverType() === 'pgsql') { |
| 168 | - $sql->addWhere('"m"."' . $relation['On'][1] . '"=:' . $relation['On'][0]); |
|
| 168 | + $sql->addWhere('"m"."'.$relation['On'][1].'"=:'.$relation['On'][0]); |
|
| 169 | 169 | } else { |
| 170 | - $sql->addWhere('`m`.`' . $relation['On'][1] . '`=:' . $relation['On'][0]); |
|
| 170 | + $sql->addWhere('`m`.`'.$relation['On'][1].'`=:'.$relation['On'][0]); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | if ($relation['Where']) { |
@@ -380,9 +380,9 @@ discard block |
||
| 380 | 380 | if (!$where) { |
| 381 | 381 | if (self::$primaryKey) { |
| 382 | 382 | if ((new ConnectionInjector)->build()->getDriverType() === 'pgsql') { |
| 383 | - $where .= '"' . self::$primaryKey . '" = :' . self::$primaryKey; |
|
| 383 | + $where .= '"'.self::$primaryKey.'" = :'.self::$primaryKey; |
|
| 384 | 384 | } else { |
| 385 | - $where .= '`' . self::$primaryKey . '` = :' . self::$primaryKey; |
|
| 385 | + $where .= '`'.self::$primaryKey.'` = :'.self::$primaryKey; |
|
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | } else { |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function send(ResponseInterface $response) |
| 26 | 26 | { |
| 27 | - header('HTTP/' . $response->getProtocolVersion() . ' ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase()); |
|
| 27 | + header('HTTP/'.$response->getProtocolVersion().' '.$response->getStatusCode().' '.$response->getReasonPhrase()); |
|
| 28 | 28 | |
| 29 | 29 | foreach ($response->getHeaders() as $header => $values) { |
| 30 | - header($header . ': ' . implode(', ', $values)); |
|
| 30 | + header($header.': '.implode(', ', $values)); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | parent::send($response); |
@@ -123,12 +123,12 @@ |
||
| 123 | 123 | |
| 124 | 124 | switch ($required) { |
| 125 | 125 | case true: |
| 126 | - $char = $char ? $char . ':' : $char; |
|
| 127 | - $name = $name ? $name . ':' : $name; |
|
| 126 | + $char = $char ? $char.':' : $char; |
|
| 127 | + $name = $name ? $name.':' : $name; |
|
| 128 | 128 | break; |
| 129 | 129 | case false: |
| 130 | - $char = $char ? $char . '::' : $char; |
|
| 131 | - $name = $name ? $name . '::' : $name; |
|
| 130 | + $char = $char ? $char.'::' : $char; |
|
| 131 | + $name = $name ? $name.'::' : $name; |
|
| 132 | 132 | break; |
| 133 | 133 | } |
| 134 | 134 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | protected function doException(\Exception $e) |
| 31 | 31 | { |
| 32 | 32 | $command = new DefaultConsoleCommand(); |
| 33 | - $command->data = '"Error #' . $e->getCode() . ' - ' . $e->getMessage() . '"'; |
|
| 33 | + $command->data = '"Error #'.$e->getCode().' - '.$e->getMessage().'"'; |
|
| 34 | 34 | $command->execute(); |
| 35 | 35 | |
| 36 | 36 | $response = (new ResponseInjector)->build(); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $command = class_exists($command) ? $command : '\\Micro\\Cli\\Consoles\\'.ucfirst($name).'ConsoleCommand'; |
| 52 | 52 | |
| 53 | 53 | if (!class_exists($command)) { |
| 54 | - throw new Exception('Command `' . $name . '` not found'); |
|
| 54 | + throw new Exception('Command `'.$name.'` not found'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** @var ConsoleCommand $command */ |