@@ -3,8 +3,8 @@ |
||
| 3 | 3 | use Illuminate\Routing\Router; |
| 4 | 4 | /** @var Router $router */ |
| 5 | 5 | |
| 6 | -$router->group(['prefix' =>'/recipe'], function (Router $router) { |
|
| 7 | - $router->bind('recipes', function ($id) { |
|
| 6 | +$router->group(['prefix' =>'/recipe'], function(Router $router) { |
|
| 7 | + $router->bind('recipes', function($id) { |
|
| 8 | 8 | return app('Modules\Recipe\Repositories\RecipeRepository')->find($id); |
| 9 | 9 | }); |
| 10 | 10 | $router->resource('recipes', 'RecipeController', ['except' => ['show'], 'names' => [ |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function extendWith(Menu $menu) |
| 31 | 31 | { |
| 32 | - $menu->group(trans('core::sidebar.content'), function (Group $group) { |
|
| 33 | - $group->item('Recipe', function (Item $item) { |
|
| 32 | + $menu->group(trans('core::sidebar.content'), function(Group $group) { |
|
| 33 | + $group->item('Recipe', function(Item $item) { |
|
| 34 | 34 | $item->icon('fa fa-copy'); |
| 35 | 35 | $item->weight(10); |
| 36 | 36 | $item->authorize( |
| 37 | 37 | $this->auth->hasAccess('recipe.recipes.index') |
| 38 | 38 | ); |
| 39 | - $item->item(trans('recipe::recipes.title.recipes'), function (Item $item) { |
|
| 39 | + $item->item(trans('recipe::recipes.title.recipes'), function(Item $item) { |
|
| 40 | 40 | $item->icon('fa fa-copy'); |
| 41 | 41 | $item->weight(0); |
| 42 | 42 | $item->append('admin.recipe.recipe.create'); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | { |
| 158 | 158 | $lowerName = $this->getLowerName(); |
| 159 | 159 | |
| 160 | - $langPath = $this->getPath() . "/Resources/lang"; |
|
| 160 | + $langPath = $this->getPath()."/Resources/lang"; |
|
| 161 | 161 | |
| 162 | 162 | if (is_dir($langPath)) { |
| 163 | 163 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $file = 'module.json'; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - return new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 178 | + return new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->artisan('module:make', ['name' => ['Blog']]); |
| 42 | 42 | |
| 43 | 43 | foreach (config('modules.paths.generator') as $directory) { |
| 44 | - $this->assertTrue(is_dir($this->modulePath . '/' . $directory)); |
|
| 44 | + $this->assertTrue(is_dir($this->modulePath.'/'.$directory)); |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->artisan('module:make', ['name' => ['Blog']]); |
| 52 | 52 | |
| 53 | 53 | foreach (config('modules.stubs.files') as $file) { |
| 54 | - $this->assertTrue(is_file($this->modulePath . '/' . $file)); |
|
| 54 | + $this->assertTrue(is_file($this->modulePath.'/'.$file)); |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** @test */ |
| 35 | 35 | public function it_returns_a_collection() |
| 36 | 36 | { |
| 37 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
| 37 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
| 38 | 38 | |
| 39 | 39 | $this->assertInstanceOf(Collection::class, $this->repository->toCollection()); |
| 40 | 40 | $this->assertInstanceOf(Collection::class, $this->repository->collections()); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** @test */ |
| 44 | 44 | public function it_returns_all_enabled_modules() |
| 45 | 45 | { |
| 46 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
| 46 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
| 47 | 47 | |
| 48 | 48 | $this->assertCount(1, $this->repository->getByStatus(1)); |
| 49 | 49 | $this->assertCount(1, $this->repository->enabled()); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | /** @test */ |
| 53 | 53 | public function it_returns_all_disabled_modules() |
| 54 | 54 | { |
| 55 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
| 55 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
| 56 | 56 | |
| 57 | 57 | $this->assertCount(0, $this->repository->getByStatus(0)); |
| 58 | 58 | $this->assertCount(0, $this->repository->disabled()); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | /** @test */ |
| 62 | 62 | public function it_counts_all_modules() |
| 63 | 63 | { |
| 64 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
| 64 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
| 65 | 65 | |
| 66 | 66 | $this->assertEquals(1, $this->repository->count()); |
| 67 | 67 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | /** @test */ |
| 70 | 70 | public function it_finds_a_module() |
| 71 | 71 | { |
| 72 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
| 72 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
| 73 | 73 | |
| 74 | 74 | $this->assertInstanceOf(Module::class, $this->repository->find('recipe')); |
| 75 | 75 | $this->assertInstanceOf(Module::class, $this->repository->get('recipe')); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | /** @test */ |
| 87 | 87 | public function it_finds_the_module_asset_path() |
| 88 | 88 | { |
| 89 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
| 89 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
| 90 | 90 | $assetPath = $this->repository->assetPath('recipe'); |
| 91 | 91 | |
| 92 | 92 | $this->assertEquals(public_path('modules/recipe'), $assetPath); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | /** @test */ |
| 104 | 104 | public function it_sets_used_module() |
| 105 | 105 | { |
| 106 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
| 106 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
| 107 | 107 | |
| 108 | 108 | $this->repository->setUsed('Recipe'); |
| 109 | 109 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | /** @test */ |
| 135 | 135 | public function it_can_detect_if_module_is_active() |
| 136 | 136 | { |
| 137 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
| 137 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
| 138 | 138 | |
| 139 | 139 | $this->assertTrue($this->repository->active('Recipe')); |
| 140 | 140 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** @test */ |
| 143 | 143 | public function it_can_detect_if_module_is_inactive() |
| 144 | 144 | { |
| 145 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
| 145 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
| 146 | 146 | |
| 147 | 147 | $this->assertFalse($this->repository->notActive('Recipe')); |
| 148 | 148 | } |