Passed
Push — main ( 6259dd...fa2223 )
by PRATIK
03:48
created
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.