@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | $subQuery->andHaving((new \yii\db\Expression('COUNT(1) > 1'))); |
967 | 967 | $this->joins['duplicates'] = ['INNER JOIN', ['duplicates' => $subQuery], implode(' AND ', $duplicateCheckClause)]; |
968 | 968 | } |
969 | - uksort($this->joins, function ($a, $b) use ($moduleTableIndexList) { |
|
969 | + uksort($this->joins, function($a, $b) use ($moduleTableIndexList) { |
|
970 | 970 | return (int) (!isset($moduleTableIndexList[$a]) && isset($moduleTableIndexList[$b])); |
971 | 971 | }); |
972 | 972 | foreach ($this->joins as $join) { |
@@ -1362,7 +1362,7 @@ discard block |
||
1362 | 1362 | $searchParamsConditions['condition'] = $glueOrder[$key]; |
1363 | 1363 | $searchParamsConditions['rules'] = []; |
1364 | 1364 | foreach ($conditions as $condition) { |
1365 | - [$fieldName, , $sourceFieldName] = array_pad(explode(':', $condition[0]), 3, false); |
|
1365 | + [$fieldName,, $sourceFieldName] = array_pad(explode(':', $condition[0]), 3, false); |
|
1366 | 1366 | if (!$sourceFieldName) { |
1367 | 1367 | $condition[0] = "{$fieldName}:{$this->getModule()}"; |
1368 | 1368 | } |
@@ -675,7 +675,7 @@ |
||
675 | 675 | { |
676 | 676 | $quickCreateFieldList = []; |
677 | 677 | foreach ($this->getFieldsByBlocks() as $blockFields) { |
678 | - uksort($blockFields, function ($a, $b) use ($blockFields) { |
|
678 | + uksort($blockFields, function($a, $b) use ($blockFields) { |
|
679 | 679 | if ($blockFields[$a]->get('quicksequence') === $blockFields[$b]->get('quicksequence')) { |
680 | 680 | return 0; |
681 | 681 | } |
@@ -185,7 +185,7 @@ |
||
185 | 185 | if (self::IGNORE_MODULE === $tabid) { |
186 | 186 | $permittedTabIdList = \vtlib\Deprecated::getPermittedModuleIdList(); |
187 | 187 | if (!empty($permittedTabIdList)) { |
188 | - $permittedTabIdList[] = 0; // Added to support one link for all modules |
|
188 | + $permittedTabIdList[] = 0; // Added to support one link for all modules |
|
189 | 189 | foreach ($permittedTabIdList as $moduleId) { |
190 | 190 | foreach ($type as $typ) { |
191 | 191 | if (isset($rows[$moduleId][$typ])) { |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $colors = \App\Fields\Picklist::getColors($fieldName); |
620 | 620 | $this->colorsFrom = 'picklist'; |
621 | 621 | $this->colorsFromRow = 'picklist_id'; |
622 | - $this->iterateAllRows(function ($row, $groupValue, $dividingValue, $rowIndex) use ($colors) { |
|
622 | + $this->iterateAllRows(function($row, $groupValue, $dividingValue, $rowIndex) use ($colors) { |
|
623 | 623 | if (isset($colors[$row['picklist_id']])) { |
624 | 624 | $this->colors[$row['picklist_id']] = $colors[$row['picklist_id']]; |
625 | 625 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $this->colorsFrom = 'filters'; |
635 | 635 | $this->colorsFromRow = 'color'; |
636 | 636 | $colors = \App\Colors::getAllFilterColors(); |
637 | - $this->iterateAllRows(function (&$row, $groupValue, $dividingValue, $rowIndex) use ($colors) { |
|
637 | + $this->iterateAllRows(function(&$row, $groupValue, $dividingValue, $rowIndex) use ($colors) { |
|
638 | 638 | $this->colors[$dividingValue] = $colors[$this->filterIds[$dividingValue]] ?? null; |
639 | 639 | }); |
640 | 640 | } |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | { |
647 | 647 | $this->colorsFrom = 'assigned_user_id'; |
648 | 648 | $this->colorsFromRow = 'assigned_user_id'; |
649 | - $this->iterateAllRows(function ($row, $groupValue, $dividingValue, $rowIndex) { |
|
649 | + $this->iterateAllRows(function($row, $groupValue, $dividingValue, $rowIndex) { |
|
650 | 650 | $this->colors[$row['assigned_user_id']] = \App\Fields\Owner::getColor($row['assigned_user_id']); |
651 | 651 | }); |
652 | 652 | } |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | { |
659 | 659 | $this->colorsFrom = 'record_id'; |
660 | 660 | $this->colorsFromRow = 'id'; |
661 | - $this->iterateAllRows(function ($row, $groupValue, $dividingValue, $rowIndex) { |
|
661 | + $this->iterateAllRows(function($row, $groupValue, $dividingValue, $rowIndex) { |
|
662 | 662 | $this->colors[$row['id']] = \App\Colors::getRandomColor('from_id_' . $row['id']); |
663 | 663 | }); |
664 | 664 | } |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | { |
671 | 671 | $this->colorsFrom = 'record_number'; |
672 | 672 | $this->colorsFromRow = 'record_number'; |
673 | - $this->iterateAllRows(function ($row, $groupValue, $dividingValue, $rowIndex) { |
|
673 | + $this->iterateAllRows(function($row, $groupValue, $dividingValue, $rowIndex) { |
|
674 | 674 | $this->colors[$groupValue] = \App\Colors::getRandomColor('generated_' . $groupValue); |
675 | 675 | }); |
676 | 676 | } |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | $firstReturnValueForSort = 1; |
896 | 896 | $secondReturnValueForSort = -1; |
897 | 897 | } |
898 | - uksort($dataForSort, function ($a, $b) use ($dataForSort, $firstReturnValueForSort, $secondReturnValueForSort) { |
|
898 | + uksort($dataForSort, function($a, $b) use ($dataForSort, $firstReturnValueForSort, $secondReturnValueForSort) { |
|
899 | 899 | if ($dataForSort[$a]['avg'] === $dataForSort[$b]['avg']) { |
900 | 900 | return 0; |
901 | 901 | } |
@@ -998,7 +998,7 @@ discard block |
||
998 | 998 | $this->calculateAverage(); |
999 | 999 | $this->normalizeData(); |
1000 | 1000 | $this->setColorsFrom($this->findOutColorsFromRows()); |
1001 | - $this->iterateAllRows(function ($row, $groupValue, $dividingValue, $rowIndex) { |
|
1001 | + $this->iterateAllRows(function($row, $groupValue, $dividingValue, $rowIndex) { |
|
1002 | 1002 | $this->setColorFromRow($row, $groupValue, $dividingValue); |
1003 | 1003 | }); |
1004 | 1004 | return $this->data; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $moduleName = $request->getModule(); |
66 | 66 | $userId = $request->getInteger('userid'); |
67 | 67 | $status = $request->getInteger('status'); |
68 | - if (!\in_array($status, [OSSMail_Record_Model::MAIL_BOX_STATUS_ACTIVE, OSSMail_Record_Model::MAIL_BOX_STATUS_DISABLED])) { |
|
68 | + if (!\in_array($status, [OSSMail_Record_Model::MAIL_BOX_STATUS_ACTIVE, OSSMail_Record_Model::MAIL_BOX_STATUS_DISABLED])) { |
|
69 | 69 | throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $status, 406); |
70 | 70 | } |
71 | 71 | if ($userId) { |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $dataReader->close(); |
93 | 93 | |
94 | 94 | if ($decryptInstance->getQueryGenerator((int) $pauser->getValue())->createQuery()->exists()) { |
95 | - (new \App\BatchMethod(['method' => __CLASS__ . '::recalculatePasswords', 'params' => [$method, $password, $vector, $target, microtime()]]))->save(); |
|
95 | + (new \App\BatchMethod(['method' => __CLASS__ . '::recalculatePasswords', 'params' => [$method, $password, $vector, $target, microtime()]]))->save(); |
|
96 | 96 | } else { |
97 | 97 | (new \App\ConfigFile('module', \App\Module::getModuleName($target))) |
98 | 98 | ->set('encryptionMethod', $method) |
@@ -10,14 +10,14 @@ |
||
10 | 10 | 'encryptionPass' => [ |
11 | 11 | 'default' => 'yeti', |
12 | 12 | 'description' => 'Key to encrypt passwords, changing the key results in the loss of all encrypted data.', |
13 | - 'validation' => function () { |
|
13 | + 'validation' => function() { |
|
14 | 14 | return true; |
15 | 15 | } |
16 | 16 | ], |
17 | 17 | 'encryptionMethod' => [ |
18 | 18 | 'default' => 'aes-256-cbc', |
19 | 19 | 'description' => 'Encryption method.', |
20 | - 'validation' => function () { |
|
20 | + 'validation' => function() { |
|
21 | 21 | $arg = func_get_arg(0); |
22 | 22 | return empty($arg) || ($arg && \in_array($arg, \App\Encryption::getMethods())); |
23 | 23 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'BACKUP_PATH' => [ |
92 | 92 | 'default' => '', |
93 | 93 | 'description' => 'Backup catalog path.', |
94 | - 'validation' => function () { |
|
94 | + 'validation' => function() { |
|
95 | 95 | $arg = func_get_arg(0); |
96 | 96 | return '' === $arg || \App\Fields\File::isAllowedDirectory($arg); |
97 | 97 | }, |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | 'watchdogUrl' => [ |
204 | 204 | 'default' => '', |
205 | 205 | 'description' => 'YetiForce watchdog monitor URL', |
206 | - 'validation' => function () { |
|
206 | + 'validation' => function() { |
|
207 | 207 | $arg = func_get_arg(0); |
208 | 208 | return empty($arg) || \App\Validator::url($arg); |
209 | 209 | }, |
@@ -345,40 +345,40 @@ discard block |
||
345 | 345 | 'footerName' => [ |
346 | 346 | 'default' => '', |
347 | 347 | 'description' => 'Footer\'s name', |
348 | - 'validation' => function () { |
|
348 | + 'validation' => function() { |
|
349 | 349 | return true; |
350 | 350 | }, |
351 | - 'sanitization' => function () { |
|
351 | + 'sanitization' => function() { |
|
352 | 352 | return \App\Purifier::purify(func_get_arg(0)); |
353 | 353 | }, |
354 | 354 | ], |
355 | 355 | 'urlLinkedIn' => [ |
356 | 356 | 'default' => 'https://www.linkedin.com/groups/8177576', |
357 | 357 | 'description' => 'LinkedIn URL', |
358 | - 'validation' => function () { |
|
358 | + 'validation' => function() { |
|
359 | 359 | return true; |
360 | 360 | }, |
361 | - 'sanitization' => function () { |
|
361 | + 'sanitization' => function() { |
|
362 | 362 | return \App\Purifier::purify(func_get_arg(0)); |
363 | 363 | }, |
364 | 364 | ], |
365 | 365 | 'urlTwitter' => [ |
366 | 366 | 'default' => 'https://twitter.com/YetiForceEN', |
367 | 367 | 'description' => 'Twitter URL', |
368 | - 'validation' => function () { |
|
368 | + 'validation' => function() { |
|
369 | 369 | return true; |
370 | 370 | }, |
371 | - 'sanitization' => function () { |
|
371 | + 'sanitization' => function() { |
|
372 | 372 | return \App\Purifier::purify(func_get_arg(0)); |
373 | 373 | }, |
374 | 374 | ], |
375 | 375 | 'urlFacebook' => [ |
376 | 376 | 'default' => 'https://www.facebook.com/YetiForce-CRM-158646854306054/', |
377 | 377 | 'description' => 'Facebook URL', |
378 | - 'validation' => function () { |
|
378 | + 'validation' => function() { |
|
379 | 379 | return true; |
380 | 380 | }, |
381 | - 'sanitization' => function () { |
|
381 | + 'sanitization' => function() { |
|
382 | 382 | return \App\Purifier::purify(func_get_arg(0)); |
383 | 383 | }, |
384 | 384 | ], |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | 'modules' => [ |
446 | 446 | 'default' => [], |
447 | 447 | 'description' => 'List of modules where the conflict of interests mechanism is enabled.', |
448 | - 'validation' => function () { |
|
448 | + 'validation' => function() { |
|
449 | 449 | return true; |
450 | 450 | }, |
451 | 451 | ], |
@@ -552,15 +552,7 @@ discard block |
||
552 | 552 | $tokens = token_get_all($this->getContents(), TOKEN_PARSE); |
553 | 553 | foreach ($tokens as $token) { |
554 | 554 | switch (\is_array($token) ? $token[0] : $token) { |
555 | - case T_COMMENT: |
|
556 | - case T_DOC_COMMENT: |
|
557 | - case T_WHITESPACE: |
|
558 | - case T_CURLY_OPEN: |
|
559 | - case T_OPEN_TAG: |
|
560 | - case T_CLOSE_TAG: |
|
561 | - case T_INLINE_HTML: |
|
562 | - case T_DOLLAR_OPEN_CURLY_BRACES: |
|
563 | - continue 2; |
|
555 | + case T_COMMENT : case T_DOC_COMMENT : case T_WHITESPACE : case T_CURLY_OPEN : case T_OPEN_TAG : case T_CLOSE_TAG : case T_INLINE_HTML : case T_DOLLAR_OPEN_CURLY_BRACES : continue 2; |
|
564 | 556 | case T_DOUBLE_COLON: |
565 | 557 | case T_ABSTRACT: |
566 | 558 | case T_ARRAY: |
@@ -1361,7 +1353,7 @@ discard block |
||
1361 | 1353 | */ |
1362 | 1354 | public static function parse(array $value) |
1363 | 1355 | { |
1364 | - return array_reduce($value, function ($result, $item) { |
|
1356 | + return array_reduce($value, function($result, $item) { |
|
1365 | 1357 | if (isset($item['key'])) { |
1366 | 1358 | $result[$item['key']] = $item; |
1367 | 1359 | } |