@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->file = $file; |
| 52 | 52 | $this->setStatus($statusCode); |
| 53 | 53 | $this->setHeaders(array_merge($this->getHeaders(), $headers)); |
| 54 | - $this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"'); |
|
| 54 | + $this->addHeader('Content-Disposition', 'inline; filename="'.rawurldecode($file->getName()).'"'); |
|
| 55 | 55 | |
| 56 | 56 | $this->setETag($file->getEtag()); |
| 57 | 57 | $lastModified = new \DateTime(); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function callback(IOutput $output) { |
| 67 | 67 | if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) { |
| 68 | - $output->setHeader('Content-Length: ' . $this->file->getSize()); |
|
| 68 | + $output->setHeader('Content-Length: '.$this->file->getSize()); |
|
| 69 | 69 | $output->setOutput($this->file->getContent()); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -35,17 +35,17 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $excludedFolders = [ |
| 38 | - rtrim($root . '/data', '/'), |
|
| 39 | - rtrim($root . '/themes', '/'), |
|
| 40 | - rtrim($root . '/config', '/'), |
|
| 41 | - rtrim($root . '/apps', '/'), |
|
| 42 | - rtrim($root . '/assets', '/'), |
|
| 43 | - rtrim($root . '/lost+found', '/'), |
|
| 38 | + rtrim($root.'/data', '/'), |
|
| 39 | + rtrim($root.'/themes', '/'), |
|
| 40 | + rtrim($root.'/config', '/'), |
|
| 41 | + rtrim($root.'/apps', '/'), |
|
| 42 | + rtrim($root.'/assets', '/'), |
|
| 43 | + rtrim($root.'/lost+found', '/'), |
|
| 44 | 44 | // Ignore folders generated by updater since the updater is replaced |
| 45 | 45 | // after the integrity check is run. |
| 46 | 46 | // See https://github.com/owncloud/updater/issues/318#issuecomment-212497846 |
| 47 | - rtrim($root . '/updater', '/'), |
|
| 48 | - rtrim($root . '/_oc_upgrade', '/'), |
|
| 47 | + rtrim($root.'/updater', '/'), |
|
| 48 | + rtrim($root.'/_oc_upgrade', '/'), |
|
| 49 | 49 | ]; |
| 50 | 50 | $customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', ''); |
| 51 | 51 | if ($customDataDir !== '') { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @return bool |
| 33 | 33 | */ |
| 34 | 34 | private function isValidVersionString($versionString) { |
| 35 | - return (bool)preg_match('/^[0-9.]+$/', $versionString); |
|
| 35 | + return (bool) preg_match('/^[0-9.]+$/', $versionString); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | /** @var IShare[] $deletedShares */ |
| 67 | 67 | $deletedShares = $e->getArgument('deletedShares'); |
| 68 | 68 | |
| 69 | - $formattedDeletedShares = array_map(function ($share) { |
|
| 69 | + $formattedDeletedShares = array_map(function($share) { |
|
| 70 | 70 | return $this->formatHookParams($share); |
| 71 | 71 | }, $deletedShares); |
| 72 | 72 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function setId($id) { |
| 88 | 88 | if (is_int($id)) { |
| 89 | - $id = (string)$id; |
|
| 89 | + $id = (string) $id; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (!is_string($id)) { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | if ($this->providerId === null || $this->id === null) { |
| 116 | 116 | throw new \UnexpectedValueException; |
| 117 | 117 | } |
| 118 | - return $this->providerId . ':' . $this->id; |
|
| 118 | + return $this->providerId.':'.$this->id; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | $nodes = $userFolder->getById($this->fileId); |
| 165 | 165 | if (empty($nodes)) { |
| 166 | - throw new NotFoundException('Node for share not found, fileid: ' . $this->fileId); |
|
| 166 | + throw new NotFoundException('Node for share not found, fileid: '.$this->fileId); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | $this->node = $nodes[0]; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $capabilities = array_replace_recursive($capabilities, $c->getCapabilities()); |
| 61 | 61 | } |
| 62 | 62 | } else { |
| 63 | - throw new \InvalidArgumentException('The given Capability (' . get_class($c) . ') does not implement the ICapability interface'); |
|
| 63 | + throw new \InvalidArgumentException('The given Capability ('.get_class($c).') does not implement the ICapability interface'); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | * @return $this |
| 136 | 136 | */ |
| 137 | 137 | public function addHeader($name, $value) { |
| 138 | - $name = trim($name); // always remove leading and trailing whitespace |
|
| 138 | + $name = trim($name); // always remove leading and trailing whitespace |
|
| 139 | 139 | // to be able to reliably check for security |
| 140 | 140 | // headers |
| 141 | 141 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function __construct($arguments) { |
| 51 | 51 | $this->user = $arguments['user']; |
| 52 | 52 | $datadir = $this->user->getHome(); |
| 53 | - $this->id = 'home::' . $this->user->getUID(); |
|
| 53 | + $this->id = 'home::'.$this->user->getUID(); |
|
| 54 | 54 | |
| 55 | 55 | parent::__construct(['datadir' => $datadir]); |
| 56 | 56 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param array $params |
| 34 | 34 | */ |
| 35 | 35 | public function __construct($params) { |
| 36 | - if (! isset($params['user']) || ! $params['user'] instanceof User) { |
|
| 36 | + if (!isset($params['user']) || !$params['user'] instanceof User) { |
|
| 37 | 37 | throw new \Exception('missing user object in parameters'); |
| 38 | 38 | } |
| 39 | 39 | $this->user = $params['user']; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function getId() { |
| 44 | - return 'object::user:' . $this->user->getUID(); |
|
| 44 | + return 'object::user:'.$this->user->getUID(); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |