@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public static function filesExtsAdapter($filesAllowedExts) |
| 45 | 45 | { |
| 46 | - return array_map(function ($value) { |
|
| 46 | + return array_map(function($value) { |
|
| 47 | 47 | if (preg_match('/[^a-z0-9_-]+/i', $value)) { |
| 48 | 48 | return null; |
| 49 | 49 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public static function mailAddressesAdapter($mailAddresses) |
| 63 | 63 | { |
| 64 | - return array_filter(explode(',', $mailAddresses), function ($value) { |
|
| 64 | + return array_filter(explode(',', $mailAddresses), function($value) { |
|
| 65 | 65 | return filter_var($value, FILTER_VALIDATE_EMAIL); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public static function eventsAdapter(array $events) |
| 77 | 77 | { |
| 78 | - return array_filter($events, function ($value) { |
|
| 78 | + return array_filter($events, function($value) { |
|
| 79 | 79 | return preg_match('/^[a-z][a-z\.]+$/i', $value); |
| 80 | 80 | }); |
| 81 | 81 | } |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | if ($this->debug) { |
| 76 | 76 | $this->mailer->SMTPDebug = 2; |
| 77 | - $this->mailer->Debugoutput = function ($str, $level) { |
|
| 77 | + $this->mailer->Debugoutput = function($str, $level) { |
|
| 78 | 78 | logger($str, strtoupper($level)); |
| 79 | 79 | }; |
| 80 | 80 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | public function checkMandatory() |
| 255 | 255 | { |
| 256 | - $missing = array_filter(self::EXTENSIONS, function ($v, $k) { |
|
| 256 | + $missing = array_filter(self::EXTENSIONS, function($v, $k) { |
|
| 257 | 257 | return $v === true && !in_array($k, $this->available); |
| 258 | 258 | }, ARRAY_FILTER_USE_BOTH); |
| 259 | 259 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | public function getMissing() |
| 273 | 273 | { |
| 274 | - return array_filter(self::EXTENSIONS, function ($k) { |
|
| 274 | + return array_filter(self::EXTENSIONS, function($k) { |
|
| 275 | 275 | return !in_array($k, $this->available); |
| 276 | 276 | }, ARRAY_FILTER_USE_KEY); |
| 277 | 277 | } |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | { |
| 87 | 87 | if (is_array($data) || is_object($data)) { |
| 88 | 88 | array_walk_recursive($data, |
| 89 | - function (&$value) { |
|
| 89 | + function(&$value) { |
|
| 90 | 90 | if (is_object($value)) { |
| 91 | 91 | foreach ($value as $property => $v) { |
| 92 | 92 | if (is_string($v) && $v !== '') { |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $gridData = new DataGridData(); |
| 118 | 118 | $gridData->setDataRowSourceId('id'); |
| 119 | 119 | $gridData->addDataRowSource('name'); |
| 120 | - $gridData->addDataRowSource('moduleId', false, function ($value) { |
|
| 120 | + $gridData->addDataRowSource('moduleId', false, function($value) { |
|
| 121 | 121 | return CustomFieldDefService::getFieldModuleById($value); |
| 122 | 122 | }); |
| 123 | 123 | $gridData->addDataRowSource('typeName'); |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $gridData = new DataGridData(); |
| 118 | 118 | $gridData->setDataRowSourceId('id'); |
| 119 | 119 | $gridData->addDataRowSource('userLogin'); |
| 120 | - $gridData->addDataRowSource('actionId', false, function ($value) { |
|
| 120 | + $gridData->addDataRowSource('actionId', false, function($value) { |
|
| 121 | 121 | return Acl::getActionInfo($value); |
| 122 | 122 | }); |
| 123 | 123 | $gridData->setData($this->queryResult); |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | public function setFields(array $fields, array $values) |
| 66 | 66 | { |
| 67 | - $this->fields = array_map(function ($value) { |
|
| 67 | + $this->fields = array_map(function($value) { |
|
| 68 | 68 | return strpos($value, '=') === false ? "$value = ?" : $value; |
| 69 | 69 | }, $fields); |
| 70 | 70 | |
@@ -127,22 +127,22 @@ |
||
| 127 | 127 | $selectTags = SelectItemAdapter::factory(TagService::getItemsBasic()); |
| 128 | 128 | |
| 129 | 129 | $usersView = SelectItemAdapter::getIdFromArrayOfObjects( |
| 130 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
| 130 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
| 131 | 131 | return (int)$value->isEdit === 0; |
| 132 | 132 | })); |
| 133 | 133 | |
| 134 | 134 | $usersEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
| 135 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
| 135 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
| 136 | 136 | return (int)$value->isEdit === 1; |
| 137 | 137 | })); |
| 138 | 138 | |
| 139 | 139 | $userGroupsView = SelectItemAdapter::getIdFromArrayOfObjects( |
| 140 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
| 140 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
| 141 | 141 | return (int)$value->isEdit === 0; |
| 142 | 142 | })); |
| 143 | 143 | |
| 144 | 144 | $userGroupsEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
| 145 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
| 145 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
| 146 | 146 | return (int)$value->isEdit === 1; |
| 147 | 147 | })); |
| 148 | 148 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $oops = "Oops, it looks like this content does not exist..."; |
| 136 | 136 | |
| 137 | - $this->router->onError(function ($router, $err_msg, $type, $err) { |
|
| 137 | + $this->router->onError(function($router, $err_msg, $type, $err) { |
|
| 138 | 138 | logger('Routing error: ' . $err_msg); |
| 139 | 139 | |
| 140 | 140 | /** @var Exception|\Throwable $err */ |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | // Manage requests for api module |
| 148 | 148 | $this->router->respond(['POST'], |
| 149 | 149 | '@/api\.php', |
| 150 | - function ($request, $response, $service) use ($oops) { |
|
| 150 | + function($request, $response, $service) use ($oops) { |
|
| 151 | 151 | try { |
| 152 | 152 | $apiRequest = self::$container->get(ApiRequest::class); |
| 153 | 153 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | // Manage requests for web module |
| 187 | 187 | $this->router->respond(['GET', 'POST'], |
| 188 | 188 | '@/index\.php', |
| 189 | - function ($request, $response, $service) use ($oops) { |
|
| 189 | + function($request, $response, $service) use ($oops) { |
|
| 190 | 190 | try { |
| 191 | 191 | /** @var \Klein\Request $request */ |
| 192 | 192 | $route = Filter::getString($request->param('r', 'index/index')); |