Completed
Push — 2.0 ( 95f77b...f37c7a )
by Nicolas
24:58 queued 15:12
created
Repositories/Eloquent/EloquentTagRepository.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      * Create the tag for the specified language
45 45
      * @param  string $lang
46 46
      * @param  array  $name
47
-     * @return mixed
47
+     * @return \Illuminate\Database\Eloquent\Model
48 48
      */
49 49
     public function createForLanguage($lang = 'en', $name)
50 50
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function findByName($name)
18 18
     {
19
-        $tags = $this->model->with('translations')->whereHas('translations', function (Builder $q) use ($name) {
19
+        $tags = $this->model->with('translations')->whereHas('translations', function(Builder $q) use ($name) {
20 20
             $q->where('name', 'like', "%$name%");
21 21
         })->get();
22 22
 
Please login to merge, or discard this patch.
Providers/RouteServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     protected function getFrontendRoute()
19 19
     {
20
-        return __DIR__ . '/../Http/frontendRoutes.php';
20
+        return __DIR__.'/../Http/frontendRoutes.php';
21 21
     }
22 22
 
23 23
     /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     protected function getBackendRoute()
27 27
     {
28
-        return __DIR__ . '/../Http/backendRoutes.php';
28
+        return __DIR__.'/../Http/backendRoutes.php';
29 29
     }
30 30
 
31 31
     /**
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function getApiRoute()
35 35
     {
36
-        return __DIR__ . '/../Http/apiRoutes.php';
36
+        return __DIR__.'/../Http/apiRoutes.php';
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
Providers/BlogServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     private function registerBindings()
62 62
     {
63
-        $this->app->bind(PostRepository::class, function () {
63
+        $this->app->bind(PostRepository::class, function() {
64 64
             $repository = new EloquentPostRepository(new Post());
65 65
 
66 66
             if (config('app.cache') === false) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             return new CachePostDecorator($repository);
71 71
         });
72 72
 
73
-        $this->app->bind(CategoryRepository::class, function () {
73
+        $this->app->bind(CategoryRepository::class, function() {
74 74
             $repository = new EloquentCategoryRepository(new Category());
75 75
 
76 76
             if (config('app.cache') === false) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return new CacheCategoryDecorator($repository);
81 81
         });
82 82
 
83
-        $this->app->bind(TagRepository::class, function () {
83
+        $this->app->bind(TagRepository::class, function() {
84 84
             $repository = new EloquentTagRepository(new Tag());
85 85
 
86 86
             if (config('app.cache') === false) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             'fit' => [
98 98
                 'width' => '150',
99 99
                 'height' => '150',
100
-                'callback' => function ($constraint) {
100
+                'callback' => function($constraint) {
101 101
                     $constraint->upsize();
102 102
                 },
103 103
             ],
Please login to merge, or discard this patch.
Resources/views/admin/posts/edit.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
                     {!! Form::label('tags', 'Tags:') !!}
70 70
                     <select name="tags[]" id="tags" class="input-tags" multiple>
71 71
                         <?php foreach ($post->tags()->get() as $tag): ?>
72
-                            <?php $tagName = $tag->hasTranslation(locale()) === true ? $tag->translate(locale())->name : 'Not translated';  ?>
72
+                            <?php $tagName = $tag->hasTranslation(locale()) === true ? $tag->translate(locale())->name : 'Not translated'; ?>
73 73
                             <option value="{{ $tag->id }}" selected>{{ $tagName }}</option>
74 74
                         <?php endforeach; ?>
75 75
                     </select>
Please login to merge, or discard this patch.
Sidebar/SidebarExtender.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 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('blog::blog.title'), function (Item $item) {
34
+        $menu->group(trans('core::sidebar.content'), function(Group $group) {
35
+            $group->item(trans('blog::blog.title'), function(Item $item) {
36 36
 
37 37
                 $item->icon('fa fa-copy');
38 38
                 $item->weight(0);
39 39
 
40
-                $item->item(trans('blog::post.title.post'), function (Item $item) {
40
+                $item->item(trans('blog::post.title.post'), function(Item $item) {
41 41
                     $item->icon('fa fa-copy');
42 42
                     $item->weight(0);
43 43
                     $item->append('admin.blog.post.create');
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                         $this->auth->hasAccess('blog.posts.index')
47 47
                     );
48 48
                 });
49
-                $item->item(trans('blog::tag.title.tag'), function (Item $item) {
49
+                $item->item(trans('blog::tag.title.tag'), function(Item $item) {
50 50
                     $item->icon('fa fa-tags');
51 51
                     $item->weight(0);
52 52
                     $item->append('admin.blog.tag.create');
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                         $this->auth->hasAccess('blog.tags.index')
56 56
                     );
57 57
                 });
58
-                $item->item(trans('blog::category.title.category'), function (Item $item) {
58
+                $item->item(trans('blog::category.title.category'), function(Item $item) {
59 59
                     $item->icon('fa fa-file-text');
60 60
                     $item->weight(1);
61 61
                     $item->route('admin.blog.category.index');
Please login to merge, or discard this patch.
Repositories/Eloquent/EloquentPostRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function allTranslatedIn($lang)
81 81
     {
82
-        return $this->model->whereHas('translations', function (Builder $q) use ($lang) {
82
+        return $this->model->whereHas('translations', function(Builder $q) use ($lang) {
83 83
             $q->where('locale', "$lang");
84 84
             $q->where('title', '!=', '');
85 85
         })->with('translations')->whereStatus(Status::PUBLISHED)->orderBy('created_at', 'DESC')->get();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function findBySlug($slug)
127 127
     {
128
-        return $this->model->whereHas('translations', function (Builder $q) use ($slug) {
128
+        return $this->model->whereHas('translations', function(Builder $q) use ($slug) {
129 129
             $q->where('slug', "$slug");
130 130
         })->with('translations')->whereStatus(Status::PUBLISHED)->firstOrFail();
131 131
     }
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
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         return $this->cache
29 29
             ->tags([$this->entityName, 'global'])
30 30
             ->remember("{$this->locale}.{$this->entityName}.findByName.{$name}", $this->cacheTime,
31
-                function () use ($name) {
31
+                function() use ($name) {
32 32
                     return $this->repository->findByName($name);
33 33
                 }
34 34
             );
Please login to merge, or discard this patch.
Repositories/Cache/CachePostDecorator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         return $this->cache
26 26
             ->tags([$this->entityName, 'global'])
27 27
             ->remember("{$this->locale}.{$this->entityName}.latest.{$amount}", $this->cacheTime,
28
-                function () use ($amount) {
28
+                function() use ($amount) {
29 29
                     return $this->repository->latest($amount);
30 30
                 }
31 31
             );
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         return $this->cache
44 44
             ->tags([$this->entityName, 'global'])
45 45
             ->remember("{$this->locale}.{$this->entityName}.getPreviousOf.{$postId}", $this->cacheTime,
46
-                function () use ($post) {
46
+                function() use ($post) {
47 47
                     return $this->repository->getPreviousOf($post);
48 48
                 }
49 49
             );
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         return $this->cache
62 62
             ->tags([$this->entityName, 'global'])
63 63
             ->remember("{$this->locale}.{$this->entityName}.getNextOf.{$postId}", $this->cacheTime,
64
-                function () use ($post) {
64
+                function() use ($post) {
65 65
                     return $this->repository->getNextOf($post);
66 66
                 }
67 67
             );
Please login to merge, or discard this patch.
Http/frontendRoutes.php 1 patch
Spacing   +3 added lines, -3 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' => 'blog'], function (Router $router) {
6
+$router->group(['prefix' => 'blog'], function(Router $router) {
7 7
     $locale = LaravelLocalization::setLocale() ?: App::getLocale();
8
-    $router->get('posts', ['as' => $locale . '.blog', 'uses' => 'PublicController@index']);
9
-    $router->get('posts/{slug}', ['as' => $locale . '.blog.slug', 'uses' => 'PublicController@show']);
8
+    $router->get('posts', ['as' => $locale.'.blog', 'uses' => 'PublicController@index']);
9
+    $router->get('posts/{slug}', ['as' => $locale.'.blog.slug', 'uses' => 'PublicController@show']);
10 10
 });
Please login to merge, or discard this patch.