Passed
Push — master ( a8e4d4...81b17d )
by Giacomo
51:25 queued 46:20
created
src/syncUtils.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Illuminate\Support\Facades\Config;
6 6
 use Jenssegers\Mongodb\Eloquent\Model;
7 7
 
8
-if (! function_exists('getTranslatedContent')) {
8
+if (!function_exists('getTranslatedContent')) {
9 9
 
10 10
     /**
11 11
      * @param array $mlCollection
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         //Get current Lang
18 18
         $cl = Config::get('app.locale');
19 19
 
20
-        if (is_array($mlCollection) && (array_key_exists('en_EN', $mlCollection) || array_key_exists('it_IT', $mlCollection) || ! is_null($mlCollection || ! isset($destination)))) {
20
+        if (is_array($mlCollection) && (array_key_exists('en_EN', $mlCollection) || array_key_exists('it_IT', $mlCollection) || !is_null($mlCollection || !isset($destination)))) {
21 21
             return $mlCollection[$cl];
22 22
         } else {
23 23
             return '';
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 }
27 27
 
28
-if (! function_exists('cl')) {
28
+if (!function_exists('cl')) {
29 29
 
30 30
     /**
31 31
      * @return string current Lang
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     }
38 38
 }
39 39
 
40
-if (! function_exists('ml')) {
40
+if (!function_exists('ml')) {
41 41
     //save a localized field
42 42
     /**
43 43
      * @param array $destination
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     }
56 56
 }
57 57
 
58
-if (! function_exists('isML')) {
58
+if (!function_exists('isML')) {
59 59
     function isML($value)
60 60
     {
61 61
         if (array_key_exists('is-ml', $value)) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     }
67 67
 }
68 68
 
69
-if (! function_exists('isMD')) {
69
+if (!function_exists('isMD')) {
70 70
     function isMD($value)
71 71
     {
72 72
         if (array_key_exists('is-md', $value)) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         }
77 77
     }
78 78
 }
79
-if (! function_exists('is_EM')) {
79
+if (!function_exists('is_EM')) {
80 80
     function is_EM($value)
81 81
     {
82 82
         if ($value === 'EmbedsMany') {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     }
88 88
 }
89 89
 
90
-if (! function_exists('is_EO')) {
90
+if (!function_exists('is_EO')) {
91 91
     function is_EO($value)
92 92
     {
93 93
         if ($value === 'EmbedsOne') {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 }
100 100
 
101
-if (! function_exists('is_HM')) {
101
+if (!function_exists('is_HM')) {
102 102
     function is_HM($value)
103 103
     {
104 104
         if ($value === 'HasMany') {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     }
110 110
 }
111 111
 
112
-if (! function_exists('is_HO')) {
112
+if (!function_exists('is_HO')) {
113 113
     function is_HO($value)
114 114
     {
115 115
         if ($value === 'HasOne') {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     }
121 121
 }
122 122
 
123
-if (! function_exists('isEditable')) {
123
+if (!function_exists('isEditable')) {
124 124
     function isEditable($value)
125 125
     {
126 126
         if (array_key_exists('is-editable', $value)) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     }
132 132
 }
133 133
 
134
-if (! function_exists('hasTarget')) {
134
+if (!function_exists('hasTarget')) {
135 135
     function hasTarget($value)
136 136
     {
137 137
         if (array_key_exists('has-target', $value)) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         }
142 142
     }
143 143
 }
144
-if (! function_exists('isFillable')) {
144
+if (!function_exists('isFillable')) {
145 145
     function isFillable($value, $event)
146 146
     {
147 147
         if ($event === 'add') {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     }
153 153
 }
154 154
 
155
-if (! function_exists('getRequestToBeSync')) {
155
+if (!function_exists('getRequestToBeSync')) {
156 156
     /**
157 157
      * @param $ref_id
158 158
      * @param $modelOnTarget
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     }
184 184
 }
185 185
 
186
-if (! function_exists('getPrimaryRequest')) {
186
+if (!function_exists('getPrimaryRequest')) {
187 187
     /**
188 188
      * @param string $request
189 189
      *
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     function getPrimaryRequest($request)
193 193
     {
194
-        if (! is_null($request)) {
194
+        if (!is_null($request)) {
195 195
             $arr = [];
196 196
             $categorylistdataJson = $request;
197 197
             $categorylistdataArr = json_decode($categorylistdataJson);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     }
211 211
 }
212 212
 
213
-if (! function_exists('getAID')) {
213
+if (!function_exists('getAID')) {
214 214
     /**
215 215
      * @param Model $model
216 216
      * @return string
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     }
225 225
 }
226 226
 
227
-if (! function_exists('isRequestReadyToBeProcessed')) {
227
+if (!function_exists('isRequestReadyToBeProcessed')) {
228 228
     function isRequestReadyToBeProcessed(Request $request)
229 229
     {
230 230
         $requests = $request->all();
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
     }
242 242
 }
243 243
 
244
-if (! function_exists('removeSubCollectionInput')) {
244
+if (!function_exists('removeSubCollectionInput')) {
245 245
     function removeSubCollectionInput(Request $request)
246 246
     {
247 247
         return $request;
248 248
     }
249 249
 }
250 250
 
251
-if (! function_exists('prepareRequest')) {
251
+if (!function_exists('prepareRequest')) {
252 252
 
253 253
     /**
254 254
      * @param Request $request
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     }
271 271
 }
272 272
 
273
-if (! function_exists('getArrayWithEmptyObj')) {
273
+if (!function_exists('getArrayWithEmptyObj')) {
274 274
 
275 275
     /**
276 276
      * @param $model
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     }
298 298
 }
299 299
 
300
-if (! function_exists('getCounterForRelationships')) {
300
+if (!function_exists('getCounterForRelationships')) {
301 301
 
302 302
     /**
303 303
      * @param $method
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
     }
318 318
 
319
-    if (! function_exists('getTypeOnTarget')) {
319
+    if (!function_exists('getTypeOnTarget')) {
320 320
         function getTypeOnTarget($relation)
321 321
         {
322 322
             return Arr::has($relation, 'typeOnTarget') ? Arr::get($relation, 'typeOnTarget') : 'EmbedsMany';
Please login to merge, or discard this patch.