@@ -117,7 +117,7 @@ |
||
| 117 | 117 | if (array_key_exists($key, $this->vars)) { |
| 118 | 118 | $this->vars[$key][] = $value; |
| 119 | 119 | } else { |
| 120 | - $this->vars[$key] = [ $value ]; |
|
| 120 | + $this->vars[$key] = [$value]; |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | |
@@ -65,8 +65,8 @@ |
||
| 65 | 65 | |
| 66 | 66 | $this->commonName = isset($info['subject']['CN']) ? $info['subject']['CN'] : null; |
| 67 | 67 | $this->organization = isset($info['subject']['O']) ? $info['subject']['O'] : null; |
| 68 | - $this->issueDate = new \DateTime('@' . $info['validFrom_time_t'], $gmt); |
|
| 69 | - $this->expireDate = new \DateTime('@' . $info['validTo_time_t'], $gmt); |
|
| 68 | + $this->issueDate = new \DateTime('@'.$info['validFrom_time_t'], $gmt); |
|
| 69 | + $this->expireDate = new \DateTime('@'.$info['validTo_time_t'], $gmt); |
|
| 70 | 70 | $this->issuerName = isset($info['issuer']['CN']) ? $info['issuer']['CN'] : null; |
| 71 | 71 | $this->issuerOrganization = isset($info['issuer']['O']) ? $info['issuer']['O'] : null; |
| 72 | 72 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | $user = $this->userManager->get($userId); |
| 90 | 90 | if ($user !== null) { |
| 91 | 91 | $key = $this->keyManager->getKey($user); |
| 92 | - return (bool)openssl_verify( |
|
| 92 | + return (bool) openssl_verify( |
|
| 93 | 93 | json_encode($data['message']), |
| 94 | 94 | base64_decode($data['signature']), |
| 95 | 95 | $key->getPublic(), |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | // always add owner to the list of users with access to the file |
| 74 | 74 | $userIds = [$owner]; |
| 75 | 75 | |
| 76 | - if (!$this->util->isFile($owner . '/' . $ownerPath)) { |
|
| 76 | + if (!$this->util->isFile($owner.'/'.$ownerPath)) { |
|
| 77 | 77 | return ['users' => $userIds, 'public' => false]; |
| 78 | 78 | } |
| 79 | 79 | |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | private function buildFileNameWithSuffix($absolutePath, $postFix = '') { |
| 68 | 68 | if ($postFix !== '') { |
| 69 | - $postFix = '.' . ltrim($postFix, '.'); |
|
| 69 | + $postFix = '.'.ltrim($postFix, '.'); |
|
| 70 | 70 | $postFix = str_replace(['\\', '/'], '', $postFix); |
| 71 | 71 | $absolutePath .= '-'; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - return $absolutePath . $postFix; |
|
| 74 | + return $absolutePath.$postFix; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | $this->current[] = $uniqueFileName; |
| 128 | 128 | |
| 129 | 129 | // Build a name without postfix |
| 130 | - $path = $this->buildFileNameWithSuffix($uniqueFileName . '-folder', $postFix); |
|
| 130 | + $path = $this->buildFileNameWithSuffix($uniqueFileName.'-folder', $postFix); |
|
| 131 | 131 | mkdir($path, 0700); |
| 132 | 132 | $this->current[] = $path; |
| 133 | 133 | |
| 134 | - return $path . '/'; |
|
| 134 | + return $path.'/'; |
|
| 135 | 135 | } else { |
| 136 | 136 | $this->log->warning( |
| 137 | 137 | 'Can not create a temporary folder in directory {dir}. Check it exists and has correct permissions', |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | if ($dh) { |
| 191 | 191 | while (($file = readdir($dh)) !== false) { |
| 192 | 192 | if (substr($file, 0, 7) === self::TMP_PREFIX) { |
| 193 | - $path = $this->tmpBaseDir . '/' . $file; |
|
| 193 | + $path = $this->tmpBaseDir.'/'.$file; |
|
| 194 | 194 | $mtime = filemtime($path); |
| 195 | 195 | if ($mtime < $cutOfTime) { |
| 196 | 196 | $files[] = $path; |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | $anonPeriod = $this->reflector->getAnnotationParameter('AnonRateThrottle', 'period'); |
| 86 | 86 | $userLimit = $this->reflector->getAnnotationParameter('UserRateThrottle', 'limit'); |
| 87 | 87 | $userPeriod = $this->reflector->getAnnotationParameter('UserRateThrottle', 'period'); |
| 88 | - $rateLimitIdentifier = get_class($controller) . '::' . $methodName; |
|
| 88 | + $rateLimitIdentifier = get_class($controller).'::'.$methodName; |
|
| 89 | 89 | if ($userLimit !== '' && $userPeriod !== '' && $this->userSession->isLoggedIn()) { |
| 90 | 90 | $this->limiter->registerUserRequest( |
| 91 | 91 | $rateLimitIdentifier, |
@@ -70,8 +70,8 @@ |
||
| 70 | 70 | 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage, |
| 71 | 71 | ]; |
| 72 | 72 | |
| 73 | - $meta['totalitems'] = $this->itemsCount !== null ? (string)$this->itemsCount : ''; |
|
| 74 | - $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string)$this->itemsPerPage: ''; |
|
| 73 | + $meta['totalitems'] = $this->itemsCount !== null ? (string) $this->itemsCount : ''; |
|
| 74 | + $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string) $this->itemsPerPage : ''; |
|
| 75 | 75 | |
| 76 | 76 | return $this->renderResult($meta); |
| 77 | 77 | } |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | if (isset($this->entityTypeCollections[$name])) { |
| 148 | 148 | return $this->entityTypeCollections[$name]; |
| 149 | 149 | } |
| 150 | - throw new NotFound('Entity type "' . $name . '" not found."'); |
|
| 150 | + throw new NotFound('Entity type "'.$name.'" not found."'); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | foreach (['id', 'name'] as $property) { |
| 69 | 69 | $$property = trim($$property); |
| 70 | 70 | if (empty($$property) || !is_string($$property)) { |
| 71 | - throw new \InvalidArgumentException('"' . $property . '" parameter must be non-empty string'); |
|
| 71 | + throw new \InvalidArgumentException('"'.$property.'" parameter must be non-empty string'); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | $this->id = $id; |