@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setupStubPath() |
| 57 | 57 | { |
| 58 | - $this->app->booted(function ($app) { |
|
| 58 | + $this->app->booted(function($app) { |
|
| 59 | 59 | Stub::setBasePath(__DIR__.'/Commands/stubs'); |
| 60 | 60 | |
| 61 | 61 | if ($app['modules']->config('stubs.enabled') === true) { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | protected function registerNamespaces() |
| 71 | 71 | { |
| 72 | - $configPath = __DIR__ . '/../config/config.php'; |
|
| 72 | + $configPath = __DIR__.'/../config/config.php'; |
|
| 73 | 73 | $this->mergeConfigFrom($configPath, 'modules'); |
| 74 | 74 | $this->publishes([ |
| 75 | 75 | $configPath => config_path('modules.php') |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function registerServices() |
| 99 | 99 | { |
| 100 | - $this->app->singleton('modules', function ($app) { |
|
| 100 | + $this->app->singleton('modules', function($app) { |
|
| 101 | 101 | $path = $app['config']->get('modules.paths.modules'); |
| 102 | 102 | |
| 103 | 103 | return new Repository($app, $path); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function toArray() |
| 26 | 26 | { |
| 27 | - return array_map(function ($value) { |
|
| 27 | + return array_map(function($value) { |
|
| 28 | 28 | if ($value instanceof Module) { |
| 29 | 29 | return $value->json()->getAttributes(); |
| 30 | 30 | } |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | $process->setTimeout($this->timeout); |
| 136 | 136 | |
| 137 | 137 | if ($this->console instanceof Command) { |
| 138 | - $process->run(function ($type, $line) { |
|
| 138 | + $process->run(function($type, $line) { |
|
| 139 | 139 | $this->console->line($line); |
| 140 | 140 | }); |
| 141 | 141 | } |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | return json_decode($this->getContents(), 1); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () { |
|
| 125 | + return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function() { |
|
| 126 | 126 | return json_decode($this->getContents(), 1); |
| 127 | 127 | }); |
| 128 | 128 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | return array(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $files = array_map(function ($file) { |
|
| 63 | + $files = array_map(function($file) { |
|
| 64 | 64 | return str_replace('.php', '', basename($file)); |
| 65 | 65 | |
| 66 | 66 | }, $files); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | |
| 260 | 260 | $result = $query->orderBy('migration', 'desc')->get(); |
| 261 | 261 | |
| 262 | - return collect($result)->map(function ($item) { |
|
| 262 | + return collect($result)->map(function($item) { |
|
| 263 | 263 | return (array) $item; |
| 264 | 264 | })->lists('migration'); |
| 265 | 265 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function getCached() |
| 177 | 177 | { |
| 178 | - return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () { |
|
| 178 | + return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() { |
|
| 179 | 179 | return $this->toCollection()->toArray(); |
| 180 | 180 | }); |
| 181 | 181 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | { |
| 264 | 264 | $modules = $this->enabled(); |
| 265 | 265 | |
| 266 | - uasort($modules, function (Module $a, Module $b) use ($direction) { |
|
| 266 | + uasort($modules, function(Module $a, Module $b) use ($direction) { |
|
| 267 | 267 | if ($a->order == $b->order) { |
| 268 | 268 | return 0; |
| 269 | 269 | } |
@@ -12,14 +12,14 @@ discard block |
||
| 12 | 12 | public function setUp() |
| 13 | 13 | { |
| 14 | 14 | parent::setUp(); |
| 15 | - $path = __DIR__ . '/stubs/module.json'; |
|
| 15 | + $path = __DIR__.'/stubs/module.json'; |
|
| 16 | 16 | $this->json = new Json($path, $this->app['files']); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** @test */ |
| 20 | 20 | public function it_gets_the_file_path() |
| 21 | 21 | { |
| 22 | - $path = __DIR__ . '/stubs/module.json'; |
|
| 22 | + $path = __DIR__.'/stubs/module.json'; |
|
| 23 | 23 | |
| 24 | 24 | $this->assertEquals($path, $this->json->getPath()); |
| 25 | 25 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** @test */ |
| 52 | 52 | public function it_makes_json_class() |
| 53 | 53 | { |
| 54 | - $path = __DIR__ . '/stubs/module.json'; |
|
| 54 | + $path = __DIR__.'/stubs/module.json'; |
|
| 55 | 55 | $json = Json::make($path, $this->app['files']); |
| 56 | 56 | |
| 57 | 57 | $this->assertInstanceOf(Json::class, $json); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | /** @test */ |
| 61 | 61 | public function it_sets_a_path() |
| 62 | 62 | { |
| 63 | - $path = __DIR__ . '/stubs/module.json'; |
|
| 63 | + $path = __DIR__.'/stubs/module.json'; |
|
| 64 | 64 | $this->assertEquals($path, $this->json->getPath()); |
| 65 | 65 | |
| 66 | 66 | $this->json->setPath('some/path.json'); |
@@ -126,6 +126,6 @@ discard block |
||
| 126 | 126 | ] |
| 127 | 127 | } |
| 128 | 128 | '; |
| 129 | - $this->assertEquals($expected, (string)$this->json); |
|
| 129 | + $this->assertEquals($expected, (string) $this->json); |
|
| 130 | 130 | } |
| 131 | 131 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | public function setUp() |
| 14 | 14 | { |
| 15 | 15 | parent::setUp(); |
| 16 | - $this->module = new Module($this->app, 'Recipe', __DIR__ . '/stubs/Recipe'); |
|
| 16 | + $this->module = new Module($this->app, 'Recipe', __DIR__.'/stubs/Recipe'); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** @test */ |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | /** @test */ |
| 50 | 50 | public function it_gets_module_path() |
| 51 | 51 | { |
| 52 | - $this->assertEquals(__DIR__ . '/stubs/Recipe', $this->module->getPath()); |
|
| 52 | + $this->assertEquals(__DIR__.'/stubs/Recipe', $this->module->getPath()); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** @test */ |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | protected function getBackendRoute() |
| 25 | 25 | { |
| 26 | - return __DIR__ . '/../Http/backendRoutes.php'; |
|
| 26 | + return __DIR__.'/../Http/backendRoutes.php'; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |