@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $exts = explode(',', $filesAllowedExts); |
| 42 | 42 | |
| 43 | - array_walk($exts, function (&$value) { |
|
| 43 | + array_walk($exts, function(&$value) { |
|
| 44 | 44 | if (preg_match('/[^a-z0-9_-]+/i', $value)) { |
| 45 | 45 | $value = null; |
| 46 | 46 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | public function formatJsonError($e) |
| 74 | 74 | { |
| 75 | - $data = function () use ($e) { |
|
| 75 | + $data = function() use ($e) { |
|
| 76 | 76 | $class = get_class($e); |
| 77 | 77 | |
| 78 | 78 | if ($class === SPException::class |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /** |
| 72 | 72 | * @return array |
| 73 | 73 | */ |
| 74 | - $passGen = function () use ($alphabet, $length) { |
|
| 74 | + $passGen = function() use ($alphabet, $length) { |
|
| 75 | 75 | $pass = []; |
| 76 | 76 | $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache |
| 77 | 77 | |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | $appTmp = Init::$SERVERROOT . DIRECTORY_SEPARATOR . 'tmp'; |
| 327 | 327 | $file = 'syspass.test'; |
| 328 | 328 | |
| 329 | - $checkDir = function ($dir) use ($file) { |
|
| 329 | + $checkDir = function($dir) use ($file) { |
|
| 330 | 330 | if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { |
| 331 | 331 | return $dir; |
| 332 | 332 | } |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | */ |
| 522 | 522 | public static function arrayJSEscape(&$array) |
| 523 | 523 | { |
| 524 | - array_walk($array, function (&$value, $index) { |
|
| 524 | + array_walk($array, function(&$value, $index) { |
|
| 525 | 525 | $value = str_replace(['\'', '"'], '\\\'', $value); |
| 526 | 526 | }); |
| 527 | 527 | return $array; |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | if ($srcClass !== null) { |
| 561 | 561 | $replaceSrc = preg_replace_callback( |
| 562 | 562 | '/:\d+:"\x00' . preg_quote($srcClass, '/') . '\x00(\w+)"/', |
| 563 | - function ($matches) { |
|
| 563 | + function($matches) { |
|
| 564 | 564 | return ':' . strlen($matches[1]) . ':"' . $matches[1] . '"'; |
| 565 | 565 | }, |
| 566 | 566 | serialize($object) |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | if (is_array($data) || is_object($data)) { |
| 86 | 86 | array_walk_recursive($data, |
| 87 | - function (&$value) { |
|
| 87 | + function(&$value) { |
|
| 88 | 88 | if (is_object($value)) { |
| 89 | 89 | foreach ($value as &$attribute) { |
| 90 | 90 | if (is_string($attribute) && $attribute !== '') { |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | */ |
| 80 | 80 | public function getSocket($type) |
| 81 | 81 | { |
| 82 | - switch ($type){ |
|
| 82 | + switch ($type) { |
|
| 83 | 83 | case self::TYPE_TCP: |
| 84 | 84 | $this->socket = $this->getTCPSocket(); |
| 85 | 85 | break; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | if ($SearchData->getSeachString() === '' |
| 79 | 79 | || stripos($PublicLinkListData->getAccountName(), $SearchData->getSeachString()) !== false |
| 80 | 80 | || stripos($PublicLinkListData->getUserLogin(), $SearchData->getSeachString()) !== false |
| 81 | - ){ |
|
| 81 | + ) { |
|
| 82 | 82 | $publicLinks[] = $PublicLinkListData; |
| 83 | 83 | } |
| 84 | 84 | } |