Passed
Push — main ( b3d2d3...f7b23f )
by PRATIK
08:37 queued 04:51
created
src/Helpers/AdminHelper.php 1 patch
Spacing   +18 added lines, -18 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,48 +73,48 @@  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'))) : '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'))) : '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('getLazyLoadImg')) {
96
+if (!function_exists('getLazyLoadImg')) {
97 97
     function getLazyLoadImg()
98 98
     {
99 99
         return asset('website/assets/images/image-bg.svg');
100 100
     }
101 101
 }
102 102
 
103
-if (! function_exists('random_color_part')) {
103
+if (!function_exists('random_color_part')) {
104 104
     function random_color_part()
105 105
     {
106 106
         return str_pad(dechex(mt_rand(0, 255)), 2, '0', STR_PAD_LEFT);
107 107
     }
108 108
 }
109 109
 
110
-if (! function_exists('random_color')) {
110
+if (!function_exists('random_color')) {
111 111
     function random_color()
112 112
     {
113 113
         return random_color_part().random_color_part().random_color_part();
114 114
     }
115 115
 }
116 116
 
117
-if (! function_exists('setting')) {
117
+if (!function_exists('setting')) {
118 118
     function setting($setting_name, $default = null)
119 119
     {
120 120
         $valid_setting_name = strtolower(str_replace(' ', '_', $setting_name));
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     }
125 125
 }
126 126
 
127
-if (! function_exists('preference')) {
127
+if (!function_exists('preference')) {
128 128
     function preference($preference_name, bool $default = null)
129 129
     {
130 130
         $valid_preference_name = strtolower(str_replace(' ', '_', $preference_name));
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
     }
139 139
 }
140 140
 
141
-if (! function_exists('getCondition')) {
141
+if (!function_exists('getCondition')) {
142 142
     function getCondition($conditions)
143 143
     {
144 144
         $result = null;
145
-        if (! isset($conditions)) {
145
+        if (!isset($conditions)) {
146 146
             return false;
147 147
         }
148 148
 
Please login to merge, or discard this patch.