Completed
Push — master ( 5c6350...61c78a )
by Nicolas
14:48 queued 11:44
created
Providers/RouteServiceProvider.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     protected $namespace = 'Modules\Tag\Http\Controllers';
14 14
 
15 15
     /**
16
-     * @return string
16
+     * @return boolean
17 17
      */
18 18
     protected function getFrontendRoute()
19 19
     {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-     * @return string
32
+     * @return boolean
33 33
      */
34 34
     protected function getApiRoute()
35 35
     {
Please login to merge, or discard this patch.
Http/backendRoutes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 use Illuminate\Routing\Router;
4 4
 
5 5
 /** @var Router $router */
6
-$router->group(['prefix' => 'tag'], function (Router $router) {
7
-    $router->bind('tag__tag', function ($id) {
6
+$router->group(['prefix' => 'tag'], function(Router $router) {
7
+    $router->bind('tag__tag', function($id) {
8 8
         return app(\Modules\Tag\Repositories\TagRepository::class)->find($id);
9 9
     });
10 10
     $router->get('tags', [
Please login to merge, or discard this patch.
Database/Migrations/2016_07_12_181155032011_create_tag_tags_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('tag__tags', function (Blueprint $table) {
15
+        Schema::create('tag__tags', function(Blueprint $table) {
16 16
             $table->engine = 'InnoDB';
17 17
             $table->increments('id');
18 18
             $table->string('namespace');
19 19
             $table->timestamps();
20 20
         });
21 21
 
22
-        Schema::create('tag__tagged', function (Blueprint $table) {
22
+        Schema::create('tag__tagged', function(Blueprint $table) {
23 23
             $table->increments('id');
24 24
             $table->string('taggable_type');
25 25
             $table->integer('taggable_id')->unsigned();
Please login to merge, or discard this patch.
Migrations/2016_07_12_181155289444_create_tag_tag_translations_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('tag__tag_translations', function (Blueprint $table) {
16
+        Schema::create('tag__tag_translations', function(Blueprint $table) {
17 17
             $table->engine = 'InnoDB';
18 18
             $table->increments('id');
19 19
             $table->string('slug');
Please login to merge, or discard this patch.
Sidebar/SidebarExtender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
      */
32 32
     public function extendWith(Menu $menu)
33 33
     {
34
-        $menu->group(trans('core::sidebar.content'), function (Group $group) {
35
-            $group->item(trans('tag::tags.tags'), function (Item $item) {
34
+        $menu->group(trans('core::sidebar.content'), function(Group $group) {
35
+            $group->item(trans('tag::tags.tags'), function(Item $item) {
36 36
                 $item->icon('fa fa-tag');
37 37
                 $item->weight(0);
38 38
                 $item->route('admin.tag.tag.index');
Please login to merge, or discard this patch.
Repositories/Cache/CacheTagDecorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         return $this->cache
25 25
             ->tags($this->entityName, 'global')
26 26
             ->remember("{$this->locale}.{$this->entityName}.allForNamespace.{$namespace}", $this->cacheTime,
27
-                function () use ($namespace) {
27
+                function() use ($namespace) {
28 28
                     return $this->repository->allForNamespace($namespace);
29 29
                 }
30 30
             );
Please login to merge, or discard this patch.
Traits/TaggableTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         $query->with('translations');
51 51
 
52 52
         foreach ($tags as $tag) {
53
-            $query->whereHas('tags', function (Builder $query) use ($type, $tag) {
54
-                $query->whereHas('translations', function (Builder $query) use ($type, $tag) {
53
+            $query->whereHas('tags', function(Builder $query) use ($type, $tag) {
54
+                $query->whereHas('translations', function(Builder $query) use ($type, $tag) {
55 55
                     $query->where($type, $tag);
56 56
                 });
57 57
             });
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
         }
77 77
         $query->with('translations');
78 78
 
79
-        return $query->whereHas('tags', function (Builder $query) use ($type, $tags) {
80
-            $query->whereHas('translations', function (Builder $query) use ($type, $tags) {
79
+        return $query->whereHas('tags', function(Builder $query) use ($type, $tags) {
80
+            $query->whereHas('translations', function(Builder $query) use ($type, $tags) {
81 81
                 $query->whereIn($type, $tags);
82 82
             });
83 83
         });
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $tag = $this->createTagsModel()->where('namespace', $this->getEntityClassName())
166 166
             ->with('translations')
167
-            ->whereHas('translations', function (Builder $q) use ($name) {
167
+            ->whereHas('translations', function(Builder $q) use ($name) {
168 168
             $q->where('slug', $this->generateTagSlug($name));
169 169
         })->first();
170 170
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $tag = $this->createTagsModel()
211 211
             ->where('namespace', $this->getEntityClassName())
212 212
             ->with('translations')
213
-            ->whereHas('translations', function (Builder $q) use ($name) {
213
+            ->whereHas('translations', function(Builder $q) use ($name) {
214 214
                 $q->orWhere('name', $this->generateTagSlug($name));
215 215
                 $q->orWhere('slug', $this->generateTagSlug($name));
216 216
             })->first();
Please login to merge, or discard this patch.
Providers/TagServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $this->registerBindings();
33 33
 
34
-        $this->app->singleton('tag.widget.directive', function ($app) {
34
+        $this->app->singleton('tag.widget.directive', function($app) {
35 35
             return new TagWidget($app[TagRepository::class]);
36 36
         });
37 37
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $this->publishConfig('tag', 'permissions');
42 42
         $this->publishConfig('tag', 'config');
43 43
         $this->registerBladeTags();
44
-        $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations');
44
+        $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
45 45
     }
46 46
 
47 47
     /**
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
 
57 57
     private function registerBindings()
58 58
     {
59
-        $this->app->bind(TagRepository::class, function () {
59
+        $this->app->bind(TagRepository::class, function() {
60 60
             $repository = new EloquentTagRepository(new Tag());
61 61
 
62
-            if (! config('app.cache')) {
62
+            if (!config('app.cache')) {
63 63
                 return $repository;
64 64
             }
65 65
 
66 66
             return new CacheTagDecorator($repository);
67 67
         });
68 68
 
69
-        $this->app->singleton(TagManager::class, function () {
69
+        $this->app->singleton(TagManager::class, function() {
70 70
             return new TagManagerRepository();
71 71
         });
72 72
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if (app()->environment() === 'testing') {
77 77
             return;
78 78
         }
79
-        $this->app['blade.compiler']->directive('tags', function ($value) {
79
+        $this->app['blade.compiler']->directive('tags', function($value) {
80 80
             return "<?php echo TagWidget::show([$value]); ?>";
81 81
         });
82 82
     }
Please login to merge, or discard this patch.