@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $meta['share_ref'] = []; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - set_time_limit((int) ($file->getSize() / 15339168)); |
|
| 230 | + set_time_limit((int)($file->getSize() / 15339168)); |
|
| 231 | 231 | $id = new ObjectId(); |
| 232 | 232 | |
| 233 | 233 | //somehow mongo-connector does not catch metadata when set during uploadFromStream() |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | return true; |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | - return $this->doRecursiveAction(function ($node) use ($conflict, $recursion) { |
|
| 632 | + return $this->doRecursiveAction(function($node) use ($conflict, $recursion) { |
|
| 633 | 633 | $node->undelete($conflict, $recursion, false); |
| 634 | 634 | }, NodeInterface::DELETED_ONLY); |
| 635 | 635 | } |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | public function getLastModified(): int |
| 653 | 653 | { |
| 654 | 654 | if ($this->changed instanceof UTCDateTime) { |
| 655 | - return (int) $this->changed->toDateTime()->format('U'); |
|
| 655 | + return (int)$this->changed->toDateTime()->format('U'); |
|
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | return 0; |
@@ -1093,8 +1093,8 @@ discard block |
||
| 1093 | 1093 | return false; |
| 1094 | 1094 | } |
| 1095 | 1095 | |
| 1096 | - $remove = (array) $remove; |
|
| 1097 | - $attributes = (array) $attributes; |
|
| 1096 | + $remove = (array)$remove; |
|
| 1097 | + $attributes = (array)$attributes; |
|
| 1098 | 1098 | $this->_hook->run( |
| 1099 | 1099 | 'preSaveNodeAttributes', |
| 1100 | 1100 | [$this, &$attributes, &$remove, &$recursion, &$recursion_first] |
@@ -816,7 +816,6 @@ discard block |
||
| 816 | 816 | /** |
| 817 | 817 | * Set app attributes. |
| 818 | 818 | * |
| 819 | - * @param AppInterface $app |
|
| 820 | 819 | * @param array $attributes |
| 821 | 820 | * |
| 822 | 821 | * @return NodeInterface |
@@ -832,7 +831,6 @@ discard block |
||
| 832 | 831 | /** |
| 833 | 832 | * Set app attribute. |
| 834 | 833 | * |
| 835 | - * @param AppInterface $app |
|
| 836 | 834 | * @param string $attribute |
| 837 | 835 | * @param mixed $value |
| 838 | 836 | * |
@@ -853,7 +851,6 @@ discard block |
||
| 853 | 851 | /** |
| 854 | 852 | * Remove app attribute. |
| 855 | 853 | * |
| 856 | - * @param AppInterface $app |
|
| 857 | 854 | * |
| 858 | 855 | * @return NodeInterface |
| 859 | 856 | */ |
@@ -870,7 +867,6 @@ discard block |
||
| 870 | 867 | /** |
| 871 | 868 | * Remove app attribute. |
| 872 | 869 | * |
| 873 | - * @param AppInterface $app |
|
| 874 | 870 | * @param string $attribute |
| 875 | 871 | * |
| 876 | 872 | * @return NodeInterface |
@@ -888,7 +884,6 @@ discard block |
||
| 888 | 884 | /** |
| 889 | 885 | * Get app attribute. |
| 890 | 886 | * |
| 891 | - * @param AppInterface $app |
|
| 892 | 887 | * @param string $attribute |
| 893 | 888 | * |
| 894 | 889 | * @return mixed |
@@ -905,7 +900,6 @@ discard block |
||
| 905 | 900 | /** |
| 906 | 901 | * Get app attributes. |
| 907 | 902 | * |
| 908 | - * @param AppInterface $app |
|
| 909 | 903 | * |
| 910 | 904 | * @return array |
| 911 | 905 | */ |
@@ -944,7 +938,7 @@ discard block |
||
| 944 | 938 | /** |
| 945 | 939 | * Get meta attributes as array. |
| 946 | 940 | * |
| 947 | - * @param array $attribute Specify attributes to return |
|
| 941 | + * @param array $attributes Specify attributes to return |
|
| 948 | 942 | * |
| 949 | 943 | * @return array |
| 950 | 944 | */ |
@@ -1115,9 +1109,9 @@ discard block |
||
| 1115 | 1109 | /** |
| 1116 | 1110 | * Get array value via string path. |
| 1117 | 1111 | * |
| 1118 | - * @param iterable $arr |
|
| 1112 | + * @param iterable $array |
|
| 1119 | 1113 | * @param string $path |
| 1120 | - * @param string $seperator |
|
| 1114 | + * @param string $separator |
|
| 1121 | 1115 | * |
| 1122 | 1116 | * @return mixed |
| 1123 | 1117 | */ |
@@ -734,8 +734,8 @@ |
||
| 734 | 734 | |
| 735 | 735 | $ops[] = [ |
| 736 | 736 | '$sort' => [ |
| 737 | - 'sum' => -1, |
|
| 738 | - '_id' => 1, |
|
| 737 | + 'sum' => -1, |
|
| 738 | + '_id' => 1, |
|
| 739 | 739 | ], |
| 740 | 740 | ]; |
| 741 | 741 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | if (true === $string) { |
| 291 | - $found[] = (string) $share; |
|
| 291 | + $found[] = (string)$share; |
|
| 292 | 292 | } else { |
| 293 | 293 | $found[] = $share; |
| 294 | 294 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | '$or' => [ |
| 391 | 391 | ['acl' => [ |
| 392 | 392 | '$elemMatch' => [ |
| 393 | - 'id' => (string) $this->_id, |
|
| 393 | + 'id' => (string)$this->_id, |
|
| 394 | 394 | 'type' => 'user', |
| 395 | 395 | ], |
| 396 | 396 | ]], |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $list = []; |
| 408 | 408 | foreach ($item as $child) { |
| 409 | 409 | $found[] = $child['_id']; |
| 410 | - $list[(string) $child['_id']] = $child; |
|
| 410 | + $list[(string)$child['_id']] = $child; |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | if (empty($found)) { |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | $new = array_diff($found, $exists); |
| 446 | 446 | foreach ($new as $add) { |
| 447 | - $node = $list[(string) $add]; |
|
| 447 | + $node = $list[(string)$add]; |
|
| 448 | 448 | |
| 449 | 449 | $this->logger->info('found new share ['.$node['_id'].']', [ |
| 450 | 450 | 'category' => get_class($this), |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | */ |
| 528 | 528 | public function setHardQuota(int $quota): self |
| 529 | 529 | { |
| 530 | - $this->hard_quota = (int) $quota; |
|
| 530 | + $this->hard_quota = (int)$quota; |
|
| 531 | 531 | $this->save(['hard_quota']); |
| 532 | 532 | |
| 533 | 533 | return $this; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | */ |
| 543 | 543 | public function setSoftQuota(int $quota): self |
| 544 | 544 | { |
| 545 | - $this->soft_quota = (int) $quota; |
|
| 545 | + $this->soft_quota = (int)$quota; |
|
| 546 | 546 | $this->save(['soft_quota']); |
| 547 | 547 | |
| 548 | 548 | return $this; |
@@ -722,6 +722,8 @@ |
||
| 722 | 722 | /** |
| 723 | 723 | * Get resolved groups. |
| 724 | 724 | * |
| 725 | + * @param integer $offset |
|
| 726 | + * @param integer $limit |
|
| 725 | 727 | * @return Generator |
| 726 | 728 | */ |
| 727 | 729 | public function getResolvedGroups(?int $offset = null, ?int $limit = null): ?Generator |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | foreach ($config as $option => $value) { |
| 58 | 58 | switch ($option) { |
| 59 | 59 | case 'interval': |
| 60 | - $this->{$option} = (int) $value; |
|
| 60 | + $this->{$option} = (int)$value; |
|
| 61 | 61 | |
| 62 | 62 | break; |
| 63 | 63 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | switch ($option) { |
| 66 | 66 | case 'max_age': |
| 67 | 67 | case 'interval': |
| 68 | - $this->{$option} = (int) $value; |
|
| 68 | + $this->{$option} = (int)$value; |
|
| 69 | 69 | |
| 70 | 70 | break; |
| 71 | 71 | default: |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -110,15 +110,15 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | switch ($value['type']) { |
| 112 | 112 | case 'string': |
| 113 | - $attributes[$attr] = (string) $value['value']; |
|
| 113 | + $attributes[$attr] = (string)$value['value']; |
|
| 114 | 114 | |
| 115 | 115 | break; |
| 116 | 116 | case 'int': |
| 117 | - $attributes[$attr] = (int) $value['value']; |
|
| 117 | + $attributes[$attr] = (int)$value['value']; |
|
| 118 | 118 | |
| 119 | 119 | break; |
| 120 | 120 | case 'bool': |
| 121 | - $attributes[$attr] = (bool) $value['value']; |
|
| 121 | + $attributes[$attr] = (bool)$value['value']; |
|
| 122 | 122 | |
| 123 | 123 | break; |
| 124 | 124 | case 'binary': |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $this->logger->info('found first time username ['.$identity->getIdentifier().'], auto-create user', [ |
| 93 | - 'category' => get_class($this), |
|
| 93 | + 'category' => get_class($this), |
|
| 94 | 94 | ]); |
| 95 | 95 | |
| 96 | 96 | $attributes = []; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public static function isValidTimestamp(string $timestamp): bool |
| 88 | 88 | { |
| 89 | - return ((string) (int) $timestamp === $timestamp) |
|
| 89 | + return ((string)(int)$timestamp === $timestamp) |
|
| 90 | 90 | && ($timestamp <= PHP_INT_MAX) |
| 91 | 91 | && ($timestamp >= ~PHP_INT_MAX); |
| 92 | 92 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | foreach ($config as $option => $value) { |
| 49 | 49 | switch ($option) { |
| 50 | 50 | case 'db': |
| 51 | - $this->db = (string) $value; |
|
| 51 | + $this->db = (string)$value; |
|
| 52 | 52 | |
| 53 | 53 | break; |
| 54 | 54 | default: |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $this->db->storage->updateOne( |
| 51 | 51 | ['_id' => $object['_id']], |
| 52 | 52 | [ |
| 53 | - '$set' => ['filter' => $filter], |
|
| 53 | + '$set' => ['filter' => $filter], |
|
| 54 | 54 | ] |
| 55 | 55 | ); |
| 56 | 56 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * balloon |