Passed
Push — main ( 6259dd...fa2223 )
by PRATIK
03:48
created
database/migrations/2021_05_24_000001_create_data_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('data', function (Blueprint $table) {
16
+        Schema::create('data', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('name');
19 19
             $table->json('content');
Please login to merge, or discard this patch.
src/Models/Admin/Data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
     {
16 16
         parent::boot();
17 17
 
18
-        static::saving(function () {
18
+        static::saving(function() {
19 19
             self::cacheKey();
20 20
         });
21 21
 
22
-        static::deleting(function () {
22
+        static::deleting(function() {
23 23
             self::cacheKey();
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
src/Helpers/AdminHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create();
80 80
 
81
-        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/' . $profile->profile_pic)) : asset('adminetic/static/profile.gif');
81
+        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/'.$profile->profile_pic)) : asset('adminetic/static/profile.gif');
82 82
     }
83 83
 }
84 84
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 if (!function_exists('random_color')) {
165 165
     function random_color()
166 166
     {
167
-        return random_color_part() . random_color_part() . random_color_part();
167
+        return random_color_part().random_color_part().random_color_part();
168 168
     }
169 169
 }
170 170
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 if (!function_exists('deleteImage')) {
196 196
     function deleteImage($image)
197 197
     {
198
-        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : '';
198
+        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : '';
199 199
     }
200 200
 }
201 201
 
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
     function getImg($img, $default)
255 255
     {
256 256
         if (isset($img)) {
257
-            if (file_exists(public_path('storage/' . $img))) {
258
-                return asset('storage/' . $img);
257
+            if (file_exists(public_path('storage/'.$img))) {
258
+                return asset('storage/'.$img);
259 259
             } elseif (file_exists(public_path($img))) {
260 260
                 return asset($img);
261 261
             } else {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 if (!function_exists('putContentToClassFunction')) {
271 271
     function putContentToClassFunction($file, $function_name, $data, $closing_token = '}')
272 272
     {
273
-        $data = $data . "\n";
273
+        $data = $data."\n";
274 274
         // Read the contents of the file into a string
275 275
         $contents = file_get_contents($file);
276 276
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         $function_definition = substr($contents, $start_pos, $end_pos - $start_pos + 1);
291 291
 
292 292
         // Append the new content to the function definition
293
-        $modified_function_definition = rtrim($function_definition, $closing_token) . $data . $closing_token;
293
+        $modified_function_definition = rtrim($function_definition, $closing_token).$data.$closing_token;
294 294
 
295 295
         // Replace the original function definition with the modified one in the class definition
296 296
         $modified_contents = substr_replace($contents, $modified_function_definition, $start_pos, $end_pos - $start_pos + 1);
Please login to merge, or discard this patch.