Passed
Push — main ( 7b8b2b...a89905 )
by PRATIK
11:51
created
src/Helpers/AdminHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create();
75 75
 
76
-        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/' . $profile->profile_pic)) : asset(config('adminetic.profile_placeholder', 'adminetic/static/profile.gif'));
76
+        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/'.$profile->profile_pic)) : asset(config('adminetic.profile_placeholder', 'adminetic/static/profile.gif'));
77 77
     }
78 78
 }
79 79
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 if (!function_exists('random_color')) {
158 158
     function random_color()
159 159
     {
160
-        return random_color_part() . random_color_part() . random_color_part();
160
+        return random_color_part().random_color_part().random_color_part();
161 161
     }
162 162
 }
163 163
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 if (!function_exists('deleteImage')) {
189 189
     function deleteImage($image)
190 190
     {
191
-        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : '';
191
+        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : '';
192 192
     }
193 193
 }
194 194
 
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
     function getImg($img, $default)
248 248
     {
249 249
         if (isset($img)) {
250
-            if (file_exists(public_path('storage/' . $img))) {
251
-                return asset('storage/' . $img);
250
+            if (file_exists(public_path('storage/'.$img))) {
251
+                return asset('storage/'.$img);
252 252
             } elseif (file_exists(public_path($img))) {
253 253
                 return asset($img);
254 254
             } else {
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 if (!function_exists('putContentToClassFunction')) {
264 264
     function putContentToClassFunction($file, $function_name, $data, $closing_token = '}')
265 265
     {
266
-        $data = $data . "\n";
266
+        $data = $data."\n";
267 267
         // Read the contents of the file into a string
268 268
         $contents = file_get_contents($file);
269 269
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         $function_definition = substr($contents, $start_pos, $end_pos - $start_pos + 1);
284 284
 
285 285
         // Append the new content to the function definition
286
-        $modified_function_definition = rtrim($function_definition, $closing_token) . $data . $closing_token;
286
+        $modified_function_definition = rtrim($function_definition, $closing_token).$data.$closing_token;
287 287
 
288 288
         // Replace the original function definition with the modified one in the class definition
289 289
         $modified_contents = substr_replace($contents, $modified_function_definition, $start_pos, $end_pos - $start_pos + 1);
Please login to merge, or discard this patch.