Passed
Push — main ( 8963f0...f48e40 )
by PRATIK
12:38
created
src/Helpers/AdminHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 if (!function_exists('getImagePlaceholder')) {
51 51
     function getImagePlaceholder()
52 52
     {
53
-        return asset(config('adminetic.default_image_placeholder' . 'adminetic/static/placeholder.png'));
53
+        return asset(config('adminetic.default_image_placeholder'.'adminetic/static/placeholder.png'));
54 54
     }
55 55
 }
56 56
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create();
76 76
 
77
-        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
+        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'));
78 78
     }
79 79
 }
80 80
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 if (!function_exists('random_color')) {
159 159
     function random_color()
160 160
     {
161
-        return random_color_part() . random_color_part() . random_color_part();
161
+        return random_color_part().random_color_part().random_color_part();
162 162
     }
163 163
 }
164 164
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 if (!function_exists('deleteImage')) {
190 190
     function deleteImage($image)
191 191
     {
192
-        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : '';
192
+        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : '';
193 193
     }
194 194
 }
195 195
 
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
     function getImg($img, $default)
249 249
     {
250 250
         if (isset($img)) {
251
-            if (file_exists(public_path('storage/' . $img))) {
252
-                return asset('storage/' . $img);
251
+            if (file_exists(public_path('storage/'.$img))) {
252
+                return asset('storage/'.$img);
253 253
             } elseif (file_exists(public_path($img))) {
254 254
                 return asset($img);
255 255
             } else {
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 if (!function_exists('putContentToClassFunction')) {
265 265
     function putContentToClassFunction($file, $function_name, $data, $closing_token = '}')
266 266
     {
267
-        $data = $data . "\n";
267
+        $data = $data."\n";
268 268
         // Read the contents of the file into a string
269 269
         $contents = file_get_contents($file);
270 270
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         $function_definition = substr($contents, $start_pos, $end_pos - $start_pos + 1);
285 285
 
286 286
         // Append the new content to the function definition
287
-        $modified_function_definition = rtrim($function_definition, $closing_token) . $data . $closing_token;
287
+        $modified_function_definition = rtrim($function_definition, $closing_token).$data.$closing_token;
288 288
 
289 289
         // Replace the original function definition with the modified one in the class definition
290 290
         $modified_contents = substr_replace($contents, $modified_function_definition, $start_pos, $end_pos - $start_pos + 1);
Please login to merge, or discard this patch.