Passed
Pull Request — master (#51)
by
unknown
10:01 queued 04:40
created
src/Extensions/MongoCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         })->first();
21 21
         if (!$out) {//Handler 404 Object Not Found
22 22
             $obj_name = get_class($this->first());
23
-            $message = __('error.' . $obj_name);
23
+            $message = __('error.'.$obj_name);
24 24
             abort(404, $message);
25 25
         } else {
26 26
             return $out;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         })->first();
43 43
         if (!$out) {//Handler 404 Object Not Found
44 44
             $obj_name = get_class($this->first());
45
-            $message = __('error.' . $obj_name);
45
+            $message = __('error.'.$obj_name);
46 46
             abort(404, $message);
47 47
         } else {
48 48
             return $out;
Please login to merge, or discard this patch.
src/Traits/MainMongoTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function checkPropertyExistence($obj, string $EOkey, $method = '', $model = '')
117 117
     {
118 118
         if (!property_exists($obj, $EOkey)) {
119
-            $msg = 'Error - ' . $EOkey . ' attribute not found on obj ' . json_encode($obj) . ' during save of model: ' . $model . ' and attribute: ' . $method;
119
+            $msg = 'Error - '.$EOkey.' attribute not found on obj '.json_encode($obj).' during save of model: '.$model.' and attribute: '.$method;
120 120
             throw new Exception($msg);
121 121
         }
122 122
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     public function checkArrayExistence($arr, string $key)
130 130
     {
131 131
         if (!Arr::has($arr, $key)) {
132
-            $msg = ('Error - ' . $key . ' attribute not found on obj ' . json_encode($arr));
132
+            $msg = ('Error - '.$key.' attribute not found on obj '.json_encode($arr));
133 133
             throw new Exception($msg);
134 134
         }
135 135
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     private function checkRequestExistence(Request $request, string $key)
143 143
     {
144 144
         if (!$request->has($key)) {
145
-            $msg = ('Error - ' . $key . ' attribute not found in Request ' . json_encode($request->all()));
145
+            $msg = ('Error - '.$key.' attribute not found in Request '.json_encode($request->all()));
146 146
             throw new Exception($msg);
147 147
         }
148 148
     }
Please login to merge, or discard this patch.
src/syncUtils.php 1 patch
Spacing   +25 added lines, -25 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('processList')) {
227
+if (!function_exists('processList')) {
228 228
     /**
229 229
      * @param array $array
230 230
      *
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     }
250 250
 }
251 251
 
252
-if (! function_exists('isRequestReadyToBeProcessed')) {
252
+if (!function_exists('isRequestReadyToBeProcessed')) {
253 253
     function isRequestReadyToBeProcessed(Request $request)
254 254
     {
255 255
         $requests = $request->all();
@@ -266,14 +266,14 @@  discard block
 block discarded – undo
266 266
     }
267 267
 }
268 268
 
269
-if (! function_exists('removeSubCollectionInput')) {
269
+if (!function_exists('removeSubCollectionInput')) {
270 270
     function removeSubCollectionInput(Request $request)
271 271
     {
272 272
         return $request;
273 273
     }
274 274
 }
275 275
 
276
-if (! function_exists('prepareRequest')) {
276
+if (!function_exists('prepareRequest')) {
277 277
 
278 278
     /**
279 279
      * @param Request $request
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     }
296 296
 }
297 297
 
298
-if (! function_exists('getArrayWithEmptyObj')) {
298
+if (!function_exists('getArrayWithEmptyObj')) {
299 299
 
300 300
     /**
301 301
      * @param $model
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     }
323 323
 }
324 324
 
325
-if (! function_exists('getCounterForRelationships')) {
325
+if (!function_exists('getCounterForRelationships')) {
326 326
 
327 327
     /**
328 328
      * @param $method
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
         }
342 342
     }
343 343
 
344
-    if (! function_exists('getTypeOnTarget')) {
345
-        function getTypeOnTarget($relation){
344
+    if (!function_exists('getTypeOnTarget')) {
345
+        function getTypeOnTarget($relation) {
346 346
             return Arr::has($relation, 'typeOnTarget') ? Arr::get($relation, 'typeOnTarget') : 'EmbedsMany';
347 347
         }
348 348
     }
Please login to merge, or discard this patch.