Passed
Pull Request — master (#134)
by webdevetc
08:56 queued 02:20
created
migrations/2018_05_28_224023_create_blog_etc_posts_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function up(): void
16 16
     {
17
-        Schema::create('blog_etc_posts', static function (Blueprint $table) {
17
+        Schema::create('blog_etc_posts', static function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
 
20 20
             $table->string('slug')->unique();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $table->timestamps();
37 37
         });
38 38
 
39
-        Schema::create('blog_etc_categories', static function (Blueprint $table) {
39
+        Schema::create('blog_etc_categories', static function(Blueprint $table) {
40 40
             $table->increments('id');
41 41
 
42 42
             $table->string('category_name')->nullable();
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         });
49 49
 
50 50
         // linking table:
51
-        Schema::create('blog_etc_post_categories', static function (Blueprint $table) {
51
+        Schema::create('blog_etc_post_categories', static function(Blueprint $table) {
52 52
             $table->increments('id');
53 53
 
54 54
             $table->unsignedInteger('blog_etc_post_id')->index();
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $table->foreign('blog_etc_category_id')->references('id')->on('blog_etc_categories')->onDelete('cascade');
59 59
         });
60 60
 
61
-        Schema::create('blog_etc_comments', static function (Blueprint $table) {
61
+        Schema::create('blog_etc_comments', static function(Blueprint $table) {
62 62
             $table->increments('id');
63 63
 
64 64
             $table->unsignedInteger('blog_etc_post_id')->index();
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::group(['middleware' => ['web'], 'namespace' => '\WebDevEtc\BlogEtc\Controllers'], static function () {
3
+Route::group(['middleware' => ['web'], 'namespace' => '\WebDevEtc\BlogEtc\Controllers'], static function() {
4 4
     /* The main public facing blog routes - show all posts, view a category, rss feed, view a single post, also the add comment route */
5
-    Route::group(['prefix' => config('blogetc.blog_prefix', 'blog')], static function () {
5
+    Route::group(['prefix' => config('blogetc.blog_prefix', 'blog')], static function() {
6 6
         Route::get('/', 'PostsController@index')->name('blogetc.index');
7 7
 
8 8
         Route::get('/search', 'PostsController@search')->name('blogetc.search');
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
         Route::get('/{blogPostSlug}', 'PostsController@show')->name('blogetc.single');
15 15
 
16
-        Route::group(['middleware' => 'throttle:10,3'], static function () {
16
+        Route::group(['middleware' => 'throttle:10,3'], static function() {
17 17
             Route::post('save_comment/{blogPostSlug}', 'CommentsController@store')->name('blogetc.comments.add_new_comment');
18 18
         });
19 19
     });
20 20
 
21 21
     /* Admin backend routes - CRUD for posts, categories, and approving/deleting submitted comments */
22
-    Route::group(['prefix' => config('blogetc.admin_prefix', 'blog_admin')], static function () {
22
+    Route::group(['prefix' => config('blogetc.admin_prefix', 'blog_admin')], static function() {
23 23
         Route::get('/', 'Admin\ManagePostsController@index')->name('blogetc.admin.index');
24 24
 
25 25
         Route::get('/add_post', 'Admin\ManagePostsController@create')->name('blogetc.admin.create_post');
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         Route::patch('/edit_post/{blogPostId}', 'Admin\ManagePostsController@update')->name('blogetc.admin.update_post');
32 32
 
33
-        Route::group(['prefix' => 'image_uploads'], static function () {
33
+        Route::group(['prefix' => 'image_uploads'], static function() {
34 34
             Route::get('/', 'BlogEtcImageUploadController@index')->name('blogetc.admin.images.all');
35 35
 
36 36
             Route::get('/upload', 'BlogEtcImageUploadController@create')->name('blogetc.admin.images.upload');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         Route::delete('/delete_post/{blogPostId}', 'Admin\ManagePostsController@destroy')->name('blogetc.admin.destroy_post');
42 42
 
43
-        Route::group(['prefix' => 'comments'], static function () {
43
+        Route::group(['prefix' => 'comments'], static function() {
44 44
             Route::get('/', 'Admin\ManageCommentsController@index')->name('blogetc.admin.comments.index');
45 45
 
46 46
             Route::patch('/{commentId}', 'Admin\ManageCommentsController@approve')->name('blogetc.admin.comments.approve');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             Route::delete('/{commentId}', 'Admin\ManageCommentsController@destroy')->name('blogetc.admin.comments.delete');
49 49
         });
50 50
 
51
-        Route::group(['prefix' => 'categories'], static function () {
51
+        Route::group(['prefix' => 'categories'], static function() {
52 52
             Route::get('/', 'Admin\ManageCategoriesController@index')->name('blogetc.admin.categories.index');
53 53
 
54 54
             Route::get('/add_category', 'Admin\ManageCategoriesController@create')->name('blogetc.admin.categories.create_category');
Please login to merge, or discard this patch.
src/Gates/DefaultAddCommentsGate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 use WebDevEtc\BlogEtc\Services\CommentsService;
5 5
 
6
-return function (/* @scrutinizer ignore-unused */ ?Model $user) {
6
+return function(/* @scrutinizer ignore-unused */ ?Model $user) {
7 7
     return CommentsService::COMMENT_TYPE_BUILT_IN === config('blogetc.comments.type_of_comments_to_show');
8 8
 };
Please login to merge, or discard this patch.
src/Views/blogetc_admin/layouts/sidebar.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
                     $categoryCount = \WebDevEtc\BlogEtc\Models\Post::count();
13 13
 
14
-                    echo $categoryCount . ' ' . str_plural('Post', $categoryCount);
14
+                    echo $categoryCount.' '.str_plural('Post', $categoryCount);
15 15
 
16 16
                     ?>)</span>
17 17
             </h6>
Please login to merge, or discard this patch.
src/Gates/DefaultAdminGate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 use WebDevEtc\BlogEtc\Exceptions\BlogEtcAuthGateNotImplementedException;
5 5
 
6
-return function (/** @scrutinizer ignore-unused */ ?Model $user) {
6
+return function(/** @scrutinizer ignore-unused */ ?Model $user) {
7 7
     // Do not copy the internals for this gate, as it provides backwards compatibility.
8 8
     if (!$user) {
9 9
         return false;
Please login to merge, or discard this patch.
src/Factories/CommentFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 use WebDevEtc\BlogEtc\Models\Comment;
9 9
 use WebDevEtc\BlogEtc\Models\Post;
10 10
 
11
-$factory->define(Comment::class, static function (Faker $faker) {
11
+$factory->define(Comment::class, static function(Faker $faker) {
12 12
     return [
13
-        'blog_etc_post_id' => function () {
13
+        'blog_etc_post_id' => function() {
14 14
             return factory(Post::class)->create()->id;
15 15
         },
16 16
         'user_id' => null,
Please login to merge, or discard this patch.