Passed
Push — main ( a078d4...e0e651 )
by Usama
04:04
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.
migrations/2025_01_01_000001_add_comment_banned_until_to_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::table('users', function (Blueprint $table) {
11
+        Schema::table('users', function(Blueprint $table) {
12 12
             $table->timestamp('comment_banned_until')->nullable()->after('remember_token');
13 13
         });
14 14
     }
15 15
 
16 16
     public function down()
17 17
     {
18
-        Schema::table('users', function (Blueprint $table) {
18
+        Schema::table('users', function(Blueprint $table) {
19 19
             $table->dropColumn('comment_banned_until');
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
src/Http/Livewire/Comment.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -132,12 +132,12 @@  discard block
 block discarded – undo
132 132
     public function selectUser($userName): void
133 133
     {
134 134
         if ($this->replyState['body']) {
135
-            $this->replyState['body'] = preg_replace('/@(\w+)$/', '@' . str_replace(' ', '_', Str::lower($userName)) . ' ',
135
+            $this->replyState['body'] = preg_replace('/@(\w+)$/', '@'.str_replace(' ', '_', Str::lower($userName)).' ',
136 136
                 $this->replyState['body']);
137 137
 //            $this->replyState['body'] =$userName;
138 138
             $this->users = [];
139 139
         } elseif ($this->editState['body']) {
140
-            $this->editState['body'] = preg_replace('/@(\w+)$/', '@' . str_replace(' ', '_', Str::lower($userName)) . ' ',
140
+            $this->editState['body'] = preg_replace('/@(\w+)$/', '@'.str_replace(' ', '_', Str::lower($userName)).' ',
141 141
                 $this->editState['body']);
142 142
             $this->users = [];
143 143
         }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     public function getUsers($searchTerm): void
153 153
     {
154 154
         if (!empty($searchTerm)) {
155
-            $this->users = User::where('name', 'like', '%' . $searchTerm . '%')->take(5)->get();
155
+            $this->users = User::where('name', 'like', '%'.$searchTerm.'%')->take(5)->get();
156 156
         } else {
157 157
             $this->users = [];
158 158
         }
Please login to merge, or discard this patch.