Passed
Pull Request — main (#23)
by PRATIK
15:59 queued 12:13
created
src/Helpers/AdminHelper.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('getClassesList')) {
3
+if (!function_exists('getClassesList')) {
4 4
     function getClassesList($dir)
5 5
     {
6 6
         $classes = \File::allFiles($dir);
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         return $classes;
16 16
     }
17 17
 }
18
-if (! function_exists('getAllModelNames')) {
18
+if (!function_exists('getAllModelNames')) {
19 19
     function getAllModelNames($dir)
20 20
     {
21 21
         $modelNames = [];
@@ -29,42 +29,42 @@  discard block
 block discarded – undo
29 29
     }
30 30
 }
31 31
 
32
-if (! function_exists('validImageFolder')) {
32
+if (!function_exists('validImageFolder')) {
33 33
     function validImageFolder($name, $default = 'default')
34 34
     {
35 35
         return strtolower(str_replace([' ', '-', '$', '<', '>', '&', '{', '}', '*', '\\', '/', ':', '.', ';', ',', "'", '"'], '_', $name ?? trim($default)));
36 36
     }
37 37
 }
38 38
 
39
-if (! function_exists('getImagePlaceholder')) {
39
+if (!function_exists('getImagePlaceholder')) {
40 40
     function getImagePlaceholder()
41 41
     {
42 42
         return asset('adminetic/static/placeholder.png');
43 43
     }
44 44
 }
45 45
 
46
-if (! function_exists('getVerticalImagePlaceholder')) {
46
+if (!function_exists('getVerticalImagePlaceholder')) {
47 47
     function getVerticalImagePlaceholder()
48 48
     {
49 49
         return asset('adminetic/static/vertical_placeholder.jpg');
50 50
     }
51 51
 }
52 52
 
53
-if (! function_exists('getSliderPlaceholder')) {
53
+if (!function_exists('getSliderPlaceholder')) {
54 54
     function getSliderPlaceholder()
55 55
     {
56 56
         return asset('adminetic/static/slider.jpg');
57 57
     }
58 58
 }
59 59
 
60
-if (! function_exists('getFoodImagePlaceholder')) {
60
+if (!function_exists('getFoodImagePlaceholder')) {
61 61
     function getFoodImagePlaceholder()
62 62
     {
63 63
         return asset('adminetic/static/food_placeholder.jpg');
64 64
     }
65 65
 }
66 66
 
67
-if (! function_exists('getProfilePlaceholder')) {
67
+if (!function_exists('getProfilePlaceholder')) {
68 68
     function getProfilePlaceholder($p = null)
69 69
     {
70 70
         $profile = $p ?? Auth::user()->profile;
@@ -73,55 +73,55 @@  discard block
 block discarded – undo
73 73
     }
74 74
 }
75 75
 
76
-if (! function_exists('getFavicon')) {
76
+if (!function_exists('getFavicon')) {
77 77
     function getFavicon()
78 78
     {
79 79
         return setting('favicon') ? (asset('storage/'.setting('favicon'))) : asset('adminetic/static/favicon.png');
80 80
     }
81 81
 }
82
-if (! function_exists('getLogo')) {
82
+if (!function_exists('getLogo')) {
83 83
     function getLogo()
84 84
     {
85 85
         return setting('logo') ? (asset('storage/'.setting('logo'))) : asset('adminetic/static/logo.png');
86 86
     }
87 87
 }
88 88
 
89
-if (! function_exists('getLogoBanner')) {
89
+if (!function_exists('getLogoBanner')) {
90 90
     function getLogoBanner()
91 91
     {
92 92
         return setting('logo_banner') ? (asset('storage/'.setting('logo_banner'))) : asset('adminetic/static/logo_banner.jpg');
93 93
     }
94 94
 }
95 95
 
96
-if (! function_exists('login_register_bg_image')) {
96
+if (!function_exists('login_register_bg_image')) {
97 97
     function login_register_bg_image()
98 98
     {
99 99
         return setting('login_register_bg_image') ? (asset('storage/'.setting('login_register_bg_image'))) : asset('adminetic/static/login_register_bg_img.jpg');
100 100
     }
101 101
 }
102 102
 
103
-if (! function_exists('getLazyLoadImg')) {
103
+if (!function_exists('getLazyLoadImg')) {
104 104
     function getLazyLoadImg()
105 105
     {
106 106
         return asset('website/assets/images/image-bg.svg');
107 107
     }
108 108
 }
109 109
 
110
-if (! function_exists('random_color_part')) {
110
+if (!function_exists('random_color_part')) {
111 111
     function random_color_part()
112 112
     {
113 113
         return str_pad(dechex(mt_rand(0, 255)), 2, '0', STR_PAD_LEFT);
114 114
     }
115 115
 }
116 116
 
117
-if (! function_exists('random_color')) {
117
+if (!function_exists('random_color')) {
118 118
     function random_color()
119 119
     {
120 120
         return random_color_part().random_color_part().random_color_part();
121 121
     }
122 122
 }
123 123
 
124
-if (! function_exists('setting')) {
124
+if (!function_exists('setting')) {
125 125
     function setting($setting_name, $default = null)
126 126
     {
127 127
         $valid_setting_name = strtolower(str_replace(' ', '_', $setting_name));
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     }
132 132
 }
133 133
 
134
-if (! function_exists('preference')) {
134
+if (!function_exists('preference')) {
135 135
     function preference($preference_name, bool $default = null)
136 136
     {
137 137
         $valid_preference_name = strtolower(str_replace(' ', '_', $preference_name));
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
     }
146 146
 }
147 147
 
148
-if (! function_exists('deleteImage')) {
148
+if (!function_exists('deleteImage')) {
149 149
     function deleteImage($image)
150 150
     {
151 151
         $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : '';
152 152
     }
153 153
 }
154 154
 
155
-if (! function_exists('getCondition')) {
155
+if (!function_exists('getCondition')) {
156 156
     function getCondition($conditions)
157 157
     {
158 158
         $result = null;
159
-        if (! isset($conditions)) {
159
+        if (!isset($conditions)) {
160 160
             return false;
161 161
         }
162 162
 
Please login to merge, or discard this patch.