Completed
Push — master ( 8bd8a3...8cd0e9 )
by David
07:08 queued 04:24
created
src/Http/Controllers/BaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
             $guest->name = 'Guest';
105 105
             $guest->email = '[email protected]';
106 106
         } else {
107
-            $guest = (object)['name' => 'Guest', 'email' => '[email protected]'];
107
+            $guest = (object)[ 'name' => 'Guest', 'email' => '[email protected]' ];
108 108
         }
109 109
         return $guest;
110 110
     }
Please login to merge, or discard this patch.
src/Http/Controllers/ForumController.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
         }
26 26
 
27 27
         $data = $this->buildData();
28
-        $data['forum'] = $forum;
28
+        $data[ 'forum' ] = $forum;
29 29
 
30 30
         return view('laravel-forum::forum.forum', $data);
31 31
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         }
40 40
 
41 41
         $data = $this->buildData();
42
-        $data['forum'] = $forum;
42
+        $data[ 'forum' ] = $forum;
43 43
 
44 44
         return view('laravel-forum::forum.createPost', $data);
45 45
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $post = ForumPost::with('replies')->where('id', $post_id)->firstOrFail();
51 51
 
52 52
             $data = $this->buildData();
53
-            $data['post'] = $post;
53
+            $data[ 'post' ] = $post;
54 54
 
55 55
             return view('laravel-forum::forum.thread', $data);
56 56
         } catch (Exception $e) {
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,36 +1,36 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::group(['namespace' => 'Taskforcedev\LaravelForum\Http\Controllers'], function() {
3
+Route::group([ 'namespace' => 'Taskforcedev\LaravelForum\Http\Controllers' ], function() {
4 4
     // Public Routes
5
-    Route::get('forum/{id}/post/{pid}', [ 'as' => 'laravel-forum.view.post',  'uses' => 'ForumController@viewPost'   ]);
5
+    Route::get('forum/{id}/post/{pid}', [ 'as' => 'laravel-forum.view.post', 'uses' => 'ForumController@viewPost' ]);
6 6
 
7
-    Route::get('forum/{id}/post',       [ 'as' => 'laravel-forum.write.post', 'uses' => 'ForumController@createPost' ]);
8
-    Route::get('forum/{id}',            [ 'as' => 'laravel-forum.view',       'uses' => 'ForumController@view'       ]);
9
-    Route::get('forum',                 [ 'as' => 'laravel-forum.index',      'uses' => 'ForumController@index'      ]);
7
+    Route::get('forum/{id}/post', [ 'as' => 'laravel-forum.write.post', 'uses' => 'ForumController@createPost' ]);
8
+    Route::get('forum/{id}', [ 'as' => 'laravel-forum.view', 'uses' => 'ForumController@view' ]);
9
+    Route::get('forum', [ 'as' => 'laravel-forum.index', 'uses' => 'ForumController@index' ]);
10 10
 
11 11
     // Admin Routes.
12
-    Route::group(['prefix' => 'admin'], function() {
13
-        Route::get('forum',            [ 'as' => 'laravel-forum.admin.index',      'uses' => 'AdminController@index'      ]);
14
-        Route::get('forum/forums',     [ 'as' => 'laravel-forum.admin.forums',     'uses' => 'AdminController@forums'     ]);
12
+    Route::group([ 'prefix' => 'admin' ], function() {
13
+        Route::get('forum', [ 'as' => 'laravel-forum.admin.index', 'uses' => 'AdminController@index' ]);
14
+        Route::get('forum/forums', [ 'as' => 'laravel-forum.admin.forums', 'uses' => 'AdminController@forums' ]);
15 15
         Route::get('forum/categories', [ 'as' => 'laravel-forum.admin.categories', 'uses' => 'AdminController@categories' ]);
16 16
     });
17 17
 
18 18
     // Api Routes.
19
-    Route::group(['prefix' => 'api'], function() {
19
+    Route::group([ 'prefix' => 'api' ], function() {
20 20
         Route::post('forum_category', [ 'as' => 'laravel-forum.api.store.forum.category', 'uses' => 'ApiController@forumCategoryStore' ]);
21
-        Route::post('forum',          [ 'as' => 'laravel-forum.api.store.forum',          'uses' => 'ApiController@forumStore'         ]);
22
-        Route::post('forum_post',     [ 'as' => 'laravel-forum.api.store.forum.post',     'uses' => 'ApiController@forumPostStore'     ]);
23
-        Route::post('forum_reply',    [ 'as' => 'laravel-forum.api.store.forum.reply',    'uses' => 'ApiController@forumReplyStore'    ]);
21
+        Route::post('forum', [ 'as' => 'laravel-forum.api.store.forum', 'uses' => 'ApiController@forumStore' ]);
22
+        Route::post('forum_post', [ 'as' => 'laravel-forum.api.store.forum.post', 'uses' => 'ApiController@forumPostStore' ]);
23
+        Route::post('forum_reply', [ 'as' => 'laravel-forum.api.store.forum.reply', 'uses' => 'ApiController@forumReplyStore' ]);
24 24
 
25 25
         Route::delete('forum_category', [ 'as' => 'laravel-forum.api.delete.forum.category', 'uses' => 'ApiController@forumCategoryDelete' ]);
26
-        Route::delete('forum',          [ 'as' => 'laravel-forum.api.delete.forum',          'uses' => 'ApiController@forumDelete'         ]);
26
+        Route::delete('forum', [ 'as' => 'laravel-forum.api.delete.forum', 'uses' => 'ApiController@forumDelete' ]);
27 27
 
28
-        Route::delete('forum/{id}/post/{pid}', [ 'as' => 'laravel-forum.api.delete.forum.post',    'uses' => 'ApiController@postDelete' ]);
28
+        Route::delete('forum/{id}/post/{pid}', [ 'as' => 'laravel-forum.api.delete.forum.post', 'uses' => 'ApiController@postDelete' ]);
29 29
 
30 30
         Route::post('post/sticky/{id}', [ 'as' => 'laravel-forum.api.post.sticky', 'uses' => 'ApiController@stickyPost' ]);
31
-        Route::post('post/lock/{id}',   [ 'as' => 'laravel-forum.api.post.lock',   'uses' => 'ApiController@lockPost'   ]);
31
+        Route::post('post/lock/{id}', [ 'as' => 'laravel-forum.api.post.lock', 'uses' => 'ApiController@lockPost' ]);
32 32
 
33 33
         Route::post('post/unsticky/{id}', [ 'as' => 'laravel-forum.api.post.unsticky', 'uses' => 'ApiController@unstickyPost' ]);
34
-        Route::post('post/unlock/{id}',   [ 'as' => 'laravel-forum.api.post.unlock',   'uses' => 'ApiController@unlockPost'   ]);
34
+        Route::post('post/unlock/{id}', [ 'as' => 'laravel-forum.api.post.unlock', 'uses' => 'ApiController@unlockPost' ]);
35 35
     });
36 36
 });
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,6 @@
 block discarded – undo
54 54
      */
55 55
     public function routes()
56 56
     {
57
-        require __DIR__ . '/Http/routes.php';
57
+        require __DIR__.'/Http/routes.php';
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
src/views/admin/category/_create.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $fields = [
3
-    ['name' => 'name', 'type' => 'text'],
3
+    [ 'name' => 'name', 'type' => 'text' ],
4 4
 ];
5 5
 $data = [
6 6
     'item' => 'Category',
Please login to merge, or discard this patch.
src/views/admin/forum/_create.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 $fields = [
3
-    ['name' => 'name', 'type' => 'text'],
4
-    ['name' => 'description', 'type' => 'text'],
3
+    [ 'name' => 'name', 'type' => 'text' ],
4
+    [ 'name' => 'description', 'type' => 'text' ],
5 5
     [
6 6
         'name' => 'category',
7 7
         'type' => 'select',
Please login to merge, or discard this patch.
src/views/admin/index.blade.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@
 block discarded – undo
6 6
     $widgets = [
7 7
 
8 8
         'forum' => [
9
-            'count' => $counts['forum'],
9
+            'count' => $counts[ 'forum' ],
10 10
             'class' => 'bg-info',
11 11
             'title' => 'Forums',
12 12
             'size' => 2,
13 13
         ],
14 14
 
15 15
         'category' => [
16
-            'count' => $counts['category'],
16
+            'count' => $counts[ 'category' ],
17 17
             'class' => 'bg-primary',
18 18
             'title' => 'Categories',
19 19
             'size' => 2,
20 20
         ],
21 21
 
22 22
         'post' => [
23
-            'count' => $counts['post'],
23
+            'count' => $counts[ 'post' ],
24 24
             'class' => 'bg-success',
25 25
             'title' => 'Posts',
26 26
             'size' => 2,
27 27
         ],
28 28
 
29 29
         'reply' => [
30
-            'count' => $counts['reply'],
30
+            'count' => $counts[ 'reply' ],
31 31
             'class' => 'bg-warning',
32 32
             'title' => 'Replies',
33 33
             'size' => 2,
Please login to merge, or discard this patch.
src/views/forum/createPost.blade.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-    if(isset($wysiwyg)) {
3
-        $wysiwygInclude = $wysiwyg['include'];
2
+    if (isset($wysiwyg)) {
3
+        $wysiwygInclude = $wysiwyg[ 'include' ];
4 4
 
5
-        switch ($wysiwyg['name']) {
5
+        switch ($wysiwyg[ 'name' ]) {
6 6
             case 'tinymce':
7 7
                 $js = '//tinymce.cachefly.net/4.2/tinymce.min.js';
8 8
                 $css = null;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     @if (isset($wysiwygInclude))
34 34
         <script type="application/javascript">
35
-            <?=$init;?>
35
+            <?=$init; ?>
36 36
         </script>
37 37
     @endif
38 38
 
Please login to merge, or discard this patch.
src/views/forum/forum.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
                 $replyCount = count($post->replies);
34 34
                 $lastReply = $post->lastReply();
35 35
                 if (isset($lastReply)) {
36
-                    $replyAuthor = $lastReply['author'];
37
-                    $replyDate = $lastReply['date'];
36
+                    $replyAuthor = $lastReply[ 'author' ];
37
+                    $replyDate = $lastReply[ 'date' ];
38 38
                 }
39 39
             ?>
40 40
             <tr>
Please login to merge, or discard this patch.