@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function bind($key, $value) |
| 77 | 77 | { |
| 78 | - if (! array_key_exists($key, $this->registry)) { |
|
| 78 | + if (!array_key_exists($key, $this->registry)) { |
|
| 79 | 79 | $this->registry[$key] = $value; |
| 80 | 80 | } else { |
| 81 | 81 | throw new \Exception("{$key} is already bound in the container."); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function get($key) |
| 91 | 91 | { |
| 92 | - if (! array_key_exists($key, $this->registry)) { |
|
| 92 | + if (!array_key_exists($key, $this->registry)) { |
|
| 93 | 93 | throw new \Exception("No {$key} is bound in the container."); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use \HotRodCli\Api\GetCommand; |
| 8 | 8 | |
| 9 | 9 | /** @var \Slim\App $api */ |
| 10 | -$api->post('/create/{command}', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($app) { |
|
| 10 | +$api->post('/create/{command}', function(ServerRequestInterface $request, ResponseInterface $response, $args) use ($app) { |
|
| 11 | 11 | return $response->getBody()->write($app->resolve(Processor::class)($request, $args)); |
| 12 | 12 | }); |
| 13 | 13 | |
@@ -19,6 +19,6 @@ discard block |
||
| 19 | 19 | return $response->getBody()->write($app->resolve(GetCommand::class)($args)); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | -$api->get('/', function (ServerRequestInterface $request, ResponseInterface $response) { |
|
| 22 | +$api->get('/', function(ServerRequestInterface $request, ResponseInterface $response) { |
|
| 23 | 23 | return $response->withStatus(302)->withHeader('Location', '/dist/ui-app'); |
| 24 | 24 | }); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $content = file_get_contents($file); |
| 41 | 41 | $array = []; |
| 42 | 42 | $array[$data['bind']][$data['name']]['text'] = 'HELLO WORLD'; |
| 43 | - $content .= PHP_EOL . PHP_EOL. $this->scriptTags['open'] . PHP_EOL . |
|
| 43 | + $content .= PHP_EOL . PHP_EOL . $this->scriptTags['open'] . PHP_EOL . |
|
| 44 | 44 | json_encode($array, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL . $this->scriptTags['close'] . PHP_EOL; |
| 45 | 45 | file_put_contents($file, $content); |
| 46 | 46 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $jobs[CopyFile::class]->handle($app->get('resource_dir') . '/classes/Observer.tphp', $this->appContainer->get('app_dir') . '/app/code/' . $namespace[0] . '/' . $namespace[1] . '/Observer/' . ucwords($input->getArgument('observer')) . '.php'); |
| 55 | 55 | |
| 56 | 56 | $this->replaceTextsSequence([ |
| 57 | - '{{namespace}}' => $namespace[0] . '\\' . $namespace[1] . '\\', |
|
| 57 | + '{{namespace}}' => $namespace[0] . '\\' . $namespace[1] . '\\', |
|
| 58 | 58 | '{{observer-name}}' => ucwords($input->getArgument('observer')) |
| 59 | 59 | ], $this->appContainer->get('app_dir') . '/app/code/' . $namespace[0] . '/' . $namespace[1] . '/Observer/'); |
| 60 | 60 | |