@@ -143,7 +143,7 @@ |
||
| 143 | 143 | } elseif ($existing === 'exclusive') { |
| 144 | 144 | return $existing; |
| 145 | 145 | } else { |
| 146 | - return $existing . ' shared locks'; |
|
| 146 | + return $existing.' shared locks'; |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * @since 13.0.0 |
| 60 | 60 | */ |
| 61 | 61 | protected function getValidatedType($type) { |
| 62 | - $type = trim((string)$type); |
|
| 62 | + $type = trim((string) $type); |
|
| 63 | 63 | |
| 64 | 64 | if ($type === '') { |
| 65 | 65 | throw new \InvalidArgumentException('Type must not be empty'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | public function file_put_contents(string $filename, string $data): int { |
| 66 | 66 | $bytesWritten = @file_put_contents($filename, $data); |
| 67 | 67 | if ($bytesWritten === false || $bytesWritten !== \strlen($data)) { |
| 68 | - throw new \Exception('Failed to write into ' . $filename); |
|
| 68 | + throw new \Exception('Failed to write into '.$filename); |
|
| 69 | 69 | } |
| 70 | 70 | return $bytesWritten; |
| 71 | 71 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function assertDirectoryExists(string $path) { |
| 86 | 86 | if (!is_dir($path)) { |
| 87 | - throw new \Exception('Directory ' . $path . ' does not exist.'); |
|
| 87 | + throw new \Exception('Directory '.$path.' does not exist.'); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | public function getEncryptedValue(): string { |
| 58 | 58 | if ($this->encryptedValue === '') { |
| 59 | 59 | $sharedSecret = random_bytes(\strlen($this->value)); |
| 60 | - $this->encryptedValue = base64_encode($this->value ^ $sharedSecret) . ':' . base64_encode($sharedSecret); |
|
| 60 | + $this->encryptedValue = base64_encode($this->value ^ $sharedSecret).':'.base64_encode($sharedSecret); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | return $this->encryptedValue; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | \OC_JSON::checkAppEnabled('user_ldap'); |
| 31 | 31 | \OC_JSON::callCheck(); |
| 32 | 32 | |
| 33 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
| 33 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
| 34 | 34 | |
| 35 | 35 | // Checkboxes are not submitted, when they are unchecked. Set them manually. |
| 36 | 36 | // only legacy checkboxes (Advanced and Expert tab) need to be handled here, |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $readOnly = false; |
| 80 | - $readOnlyIndex = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only'; |
|
| 80 | + $readOnlyIndex = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only'; |
|
| 81 | 81 | if (isset($calendar[$readOnlyIndex])) { |
| 82 | 82 | $readOnly = $calendar[$readOnlyIndex]; |
| 83 | 83 | } |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | $calendarTableData[] = [ |
| 86 | 86 | $calendar['uri'], |
| 87 | 87 | $calendar['{DAV:}displayname'], |
| 88 | - $calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'], |
|
| 89 | - $calendar['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'], |
|
| 88 | + $calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal'], |
|
| 89 | + $calendar['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname'], |
|
| 90 | 90 | $readOnly ? ' x ' : ' ✓ ', |
| 91 | 91 | ]; |
| 92 | 92 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $this |
| 39 | 39 | ->setIdentifier($invalidId) |
| 40 | 40 | ->setScheme(self::SCHEME_NULL) |
| 41 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
| 41 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
| 42 | 42 | ; |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | protected function checkPlaceholder(): void { |
| 65 | 65 | $this->sanitizedPlaceholder = trim(strtolower($this->placeholder)); |
| 66 | - if (!(bool)\preg_match('/^[a-z0-9]*$/', $this->sanitizedPlaceholder)) { |
|
| 66 | + if (!(bool) \preg_match('/^[a-z0-9]*$/', $this->sanitizedPlaceholder)) { |
|
| 67 | 67 | throw new \RuntimeException(sprintf( |
| 68 | 68 | 'Invalid placeholder %s, only [a-z0-9] are allowed', $this->sanitizedPlaceholder |
| 69 | 69 | )); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | protected function substituteIfString($value, string $replacement) { |
| 82 | 82 | if (is_string($value)) { |
| 83 | - return str_ireplace('$' . $this->sanitizedPlaceholder, $replacement, $value); |
|
| 83 | + return str_ireplace('$'.$this->sanitizedPlaceholder, $replacement, $value); |
|
| 84 | 84 | } |
| 85 | 85 | return $value; |
| 86 | 86 | } |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | // at least on PHP 5.6 usort turned out to be not stable. So we add |
| 61 | 61 | // the current index to the value and compare it on a draw |
| 62 | 62 | $i = 0; |
| 63 | - $workArray = array_map(function ($element) use (&$i) { |
|
| 63 | + $workArray = array_map(function($element) use (&$i) { |
|
| 64 | 64 | return [$i++, $element]; |
| 65 | 65 | }, $byType); |
| 66 | 66 | |
| 67 | - usort($workArray, function ($a, $b) use ($commenters, $type) { |
|
| 67 | + usort($workArray, function($a, $b) use ($commenters, $type) { |
|
| 68 | 68 | $r = $this->compare($a[1], $b[1], $commenters[$type]); |
| 69 | 69 | if ($r === 0) { |
| 70 | 70 | $r = $a[0] - $b[0]; |