Passed
Push — main ( 1a2e2c...1283a0 )
by Usama
04:16
created
database/factories/CommentFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     {
22 22
         return [
23 23
             'body' => fake()->text,
24
-            'user_id' => function () {
24
+            'user_id' => function() {
25 25
                 return User::factory()->create()->id;
26 26
             },
27 27
             'parent_id' => null,
Please login to merge, or discard this patch.
database/migrations/2023_02_24_000000_create_comments_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('comments', function (Blueprint $table) {
13
+        Schema::create('comments', function(Blueprint $table) {
14 14
             $table->id();
15 15
             $table->foreignId('user_id')->constrained()->onDelete('cascade');
16 16
             $table->foreignId('parent_id')->nullable()->constrained('comments')->onDelete('cascade');
Please login to merge, or discard this patch.
database/migrations/2023_03_24_000000_create_comment_likes_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('comment_likes', function (Blueprint $table) {
13
+        Schema::create('comment_likes', function(Blueprint $table) {
14 14
             $table->id();
15 15
             $table->foreignId('user_id')->nullable();
16 16
             $table->foreignId('comment_id');
Please login to merge, or discard this patch.
src/Providers/MarkdownServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function register(): void
19 19
     {
20
-        $this->app->singleton('markdown', function () {
20
+        $this->app->singleton('markdown', function() {
21 21
             $environment = new Environment([
22 22
                 'allow_unsafe_links' => false,
23 23
                 'html_input' => 'strip'
Please login to merge, or discard this patch.
src/Providers/CommentifyServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function register(): void
20 20
     {
21
-        $this->app->bind(CommentPolicy::class, function ($app) {
21
+        $this->app->bind(CommentPolicy::class, function($app) {
22 22
             return new CommentPolicy;
23 23
         });
24 24
 
Please login to merge, or discard this patch.
src/Scopes/HasLikes.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
         $ip = request()->ip();
25 25
         $userAgent = request()->userAgent();
26 26
         if (auth()->user()) {
27
-            return User::with('likes')->whereHas('likes', function ($q) {
27
+            return User::with('likes')->whereHas('likes', function($q) {
28 28
                 $q->where('comment_id', $this->id);
29 29
             })->count();
30 30
         }
Please login to merge, or discard this patch.