Passed
Push — master ( 4f3bb7...6aa36d )
by Rubén
04:05
created
lib/SP/Services/Upgrade/UpgradeCustomFieldDefinition.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $customFieldType[$customFieldTypeData->getName()] = $customFieldTypeData->getId();
72 72
             }
73 73
 
74
-            $this->transactionAware(function () use ($customFieldType) {
74
+            $this->transactionAware(function() use ($customFieldType) {
75 75
                 $customFieldDefService = $this->dic->get(CustomFieldDefService::class);
76 76
 
77 77
                 $queryData = new QueryData();
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         );
175 175
 
176 176
         try {
177
-            $this->transactionAware(function () {
177
+            $this->transactionAware(function() {
178 178
                 $customFieldDefService = $this->dic->get(CustomFieldDefService::class);
179 179
 
180 180
                 foreach ($customFieldDefService->getAllBasic() as $item) {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                 $customFieldType[$customFieldTypeData->getName()] = $customFieldTypeData->getId();
233 233
             }
234 234
 
235
-            $this->transactionAware(function () use ($customFieldType) {
235
+            $this->transactionAware(function() use ($customFieldType) {
236 236
                 $queryData = new QueryData();
237 237
                 $queryData->setQuery('SELECT id, field FROM CustomFieldDefinition WHERE field IS NOT NULL');
238 238
 
Please login to merge, or discard this patch.
lib/SP/Services/Account/AccountService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
      */
431 431
     public function update(AccountRequest $accountRequest)
432 432
     {
433
-        $this->transactionAware(function () use ($accountRequest) {
433
+        $this->transactionAware(function() use ($accountRequest) {
434 434
             $userData = $this->context->getUserData();
435 435
             $userProfile = $this->context->getUserProfile();
436 436
 
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
      */
553 553
     public function updateBulk(AccountBulkRequest $request)
554 554
     {
555
-        $this->transactionAware(function () use ($request) {
555
+        $this->transactionAware(function() use ($request) {
556 556
             foreach ($request->getItemsId() as $itemId) {
557 557
                 $accountRequest = $request->getAccountRequestForId($itemId);
558 558
 
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
      */
573 573
     public function editPassword(AccountRequest $accountRequest)
574 574
     {
575
-        $this->transactionAware(function () use ($accountRequest) {
575
+        $this->transactionAware(function() use ($accountRequest) {
576 576
             $this->addHistory($accountRequest->id);
577 577
 
578 578
             $pass = $this->getPasswordEncrypted($accountRequest->pass);
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
      */
607 607
     public function editRestore($historyId, $accountId)
608 608
     {
609
-        $this->transactionAware(function () use ($historyId, $accountId) {
609
+        $this->transactionAware(function() use ($historyId, $accountId) {
610 610
             $this->addHistory($accountId);
611 611
 
612 612
             if (!$this->accountRepository->editRestore($historyId, $this->context->getUserData()->getId())) {
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
      */
624 624
     public function delete($id)
625 625
     {
626
-        $this->transactionAware(function () use ($id) {
626
+        $this->transactionAware(function() use ($id) {
627 627
             $this->addHistory($id, 1);
628 628
 
629 629
             if ($this->accountRepository->delete($id) === 0) {
Please login to merge, or discard this patch.
lib/SP/Services/Account/AccountSearchService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             );
248 248
 
249 249
             if (!empty($filtersAndValues)) {
250
-                $filtersItem = array_filter($filtersAndValues, function ($value, $key) {
250
+                $filtersItem = array_filter($filtersAndValues, function($value, $key) {
251 251
                     return in_array($key, self::FILTERS['items']['subject'], true)
252 252
                         && $value !== '';
253 253
                 }, ARRAY_FILTER_USE_BOTH);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                     $this->processFilterItems($filtersItem, $queryCondition);
257 257
                 }
258 258
 
259
-                $filtersOperator = array_filter($filtersAndValues, function ($value, $key) {
259
+                $filtersOperator = array_filter($filtersAndValues, function($value, $key) {
260 260
                     return in_array($key, self::FILTERS['operator']['subject'], true)
261 261
                         && in_array($value, self::FILTERS['operator']['condition'], true);
262 262
                 }, ARRAY_FILTER_USE_BOTH);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                     $this->processFilterOperator($filtersOperator);
266 266
                 }
267 267
 
268
-                $filtersCondition = array_filter(array_map(function ($subject, $condition) {
268
+                $filtersCondition = array_filter(array_map(function($subject, $condition) {
269 269
                     if (in_array($subject, self::FILTERS['condition']['subject'], true)
270 270
                         && in_array($condition, self::FILTERS['condition']['condition'], true)
271 271
                     ) {
Please login to merge, or discard this patch.
lib/SP/Services/Import/SyspassImport.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     protected function processCategories()
193 193
     {
194 194
         $this->getNodesData('Categories', 'Category',
195
-            function (DOMElement $category) {
195
+            function(DOMElement $category) {
196 196
                 $categoryData = new CategoryData();
197 197
 
198 198
                 foreach ($category->childNodes as $node) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     protected function processClients()
232 232
     {
233 233
         $this->getNodesData('Clients', 'Client',
234
-            function (DOMElement $client) {
234
+            function(DOMElement $client) {
235 235
                 $clientData = new ClientData();
236 236
 
237 237
                 foreach ($client->childNodes as $node) {
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     protected function processCustomers()
272 272
     {
273 273
         $this->getNodesData('Customers', 'Customer',
274
-            function (DOMElement $client) {
274
+            function(DOMElement $client) {
275 275
                 $clientData = new ClientData();
276 276
 
277 277
                 foreach ($client->childNodes as $node) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     protected function processTags()
311 311
     {
312 312
         $this->getNodesData('Tags', 'Tag',
313
-            function (DOMElement $tag) {
313
+            function(DOMElement $tag) {
314 314
                 $tagData = new TagData();
315 315
 
316 316
                 foreach ($tag->childNodes as $node) {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     protected function processAccounts()
347 347
     {
348 348
         $this->getNodesData('Accounts', 'Account',
349
-            function (DOMElement $account) {
349
+            function(DOMElement $account) {
350 350
                 $accountRequest = new AccountRequest();
351 351
 
352 352
                 /** @var DOMElement $node */
Please login to merge, or discard this patch.
lib/SP/Services/Plugin/PluginDataService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         $data = $result->getDataAsArray();
131 131
 
132
-        array_walk($data, function ($itemData) {
132
+        array_walk($data, function($itemData) {
133 133
             /** @var PluginDataModel $itemData */
134 134
             $itemData->decrypt($this->getMasterKeyFromContext());
135 135
         });
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         $data = $this->pluginRepository->getAll()->getDataAsArray();
150 150
 
151
-        array_walk($data, function ($itemData) {
151
+        array_walk($data, function($itemData) {
152 152
             /** @var PluginDataModel $itemData */
153 153
             $itemData->decrypt($this->getMasterKeyFromContext());
154 154
         });
Please login to merge, or discard this patch.
lib/SP/Mvc/View/Template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         $sk = $this->vars->get('sk');
363 363
 
364 364
         // An anonymous proxy function for handling views variables
365
-        $_getvar = function ($key, $default = null) {
365
+        $_getvar = function($key, $default = null) {
366 366
             if (DEBUG && !$this->vars->exists($key)) {
367 367
                 logger(sprintf(__('Unable to retrieve "%s" variable'), $key), 'WARN');
368 368
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             return $this->vars->get($key, $default);
373 373
         };
374 374
 
375
-        $_getRoute = function ($path) use ($sk, $configData) {
375
+        $_getRoute = function($path) use ($sk, $configData) {
376 376
             $baseUrl = ($configData->getApplicationUrl() ?: Bootstrap::$WEBURI) . Bootstrap::$SUBURI;
377 377
 
378 378
             $uri = new Uri($baseUrl);
Please login to merge, or discard this patch.
lib/SP/Bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $oops = "Oops, it looks like this content does not exist...";
141 141
 
142
-        $this->router->onError(function ($router, $err_msg, $type, $err) {
142
+        $this->router->onError(function($router, $err_msg, $type, $err) {
143 143
             logger('Routing error: ' . $err_msg);
144 144
 
145 145
             /** @var Exception|Throwable $err */
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         // Manage requests for api module
153 153
         $this->router->respond(['POST'],
154 154
             '@/api\.php',
155
-            function ($request, $response, $service) use ($oops) {
155
+            function($request, $response, $service) use ($oops) {
156 156
                 try {
157 157
                     logger('API route');
158 158
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         // Manage requests for web module
196 196
         $this->router->respond(['GET', 'POST'],
197 197
             '@(?!/api\.php)',
198
-            function ($request, $response, $service) use ($oops) {
198
+            function($request, $response, $service) use ($oops) {
199 199
                 try {
200 200
                     logger('WEB route');
201 201
 
Please login to merge, or discard this patch.
lib/SP/Config/ConfigUtil.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             return [];
48 48
         }
49 49
 
50
-        return array_map(function ($value) {
50
+        return array_map(function($value) {
51 51
             if (preg_match('/[^a-z0-9_-]+/i', $value)) {
52 52
                 return null;
53 53
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             return [];
70 70
         }
71 71
 
72
-        return array_filter(explode(',', $mailAddresses), function ($value) {
72
+        return array_filter(explode(',', $mailAddresses), function($value) {
73 73
             return filter_var($value, FILTER_VALIDATE_EMAIL);
74 74
         });
75 75
     }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public static function eventsAdapter(array $events)
85 85
     {
86
-        return array_filter($events, function ($value) {
86
+        return array_filter($events, function($value) {
87 87
             return preg_match('/^[a-z][a-z\.]+$/i', $value);
88 88
         });
89 89
     }
Please login to merge, or discard this patch.
app/modules/web/Controllers/AccountController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1085,7 +1085,7 @@
 block discarded – undo
1085 1085
                     ->addExtra('accountId', $id)
1086 1086
                     ->addExtra('whoId', $this->userData->getId())
1087 1087
                     ->setExtra('userId', $usersId)
1088
-                    ->setExtra('email', array_map(function ($value) {
1088
+                    ->setExtra('email', array_map(function($value) {
1089 1089
                         return $value->email;
1090 1090
                     }, $userService->getUserEmailById($usersId))))
1091 1091
             );
Please login to merge, or discard this patch.