@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | $shareTypesByFileId = []; |
| 150 | 150 | |
| 151 | - foreach($shares as $fileId => $sharesForFile) { |
|
| 151 | + foreach ($shares as $fileId => $sharesForFile) { |
|
| 152 | 152 | $types = array_map(function(IShare $share) { |
| 153 | 153 | return $share->getShareType(); |
| 154 | 154 | }, $sharesForFile); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - $propFind->handle(self::SHARETYPES_PROPERTYNAME, function () use ($sabreNode) { |
|
| 192 | + $propFind->handle(self::SHARETYPES_PROPERTYNAME, function() use ($sabreNode) { |
|
| 193 | 193 | if (isset($this->cachedShareTypes[$sabreNode->getId()])) { |
| 194 | 194 | $shareTypes = $this->cachedShareTypes[$sabreNode->getId()]; |
| 195 | 195 | } else { |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) { |
| 52 | 52 | $access = parent::checkPrivileges($uri, $privileges, $recursion, false); |
| 53 | - if($access === false && $throwExceptions) { |
|
| 53 | + if ($access === false && $throwExceptions) { |
|
| 54 | 54 | /** @var INode $node */ |
| 55 | 55 | $node = $this->server->tree->getNodeForPath($uri); |
| 56 | 56 | |
| 57 | - switch(get_class($node)) { |
|
| 57 | + switch (get_class($node)) { |
|
| 58 | 58 | case 'OCA\DAV\CardDAV\AddressBook': |
| 59 | 59 | $type = 'Addressbook'; |
| 60 | 60 | break; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | public function propFind(PropFind $propFind, INode $node) { |
| 78 | 78 | // If the node is neither readable nor writable then fail unless its of |
| 79 | 79 | // the standard user-principal |
| 80 | - if(!($node instanceof User)) { |
|
| 80 | + if (!($node instanceof User)) { |
|
| 81 | 81 | $path = $propFind->getPath(); |
| 82 | 82 | $readPermissions = $this->checkPrivileges($path, '{DAV:}read', self::R_PARENT, false); |
| 83 | 83 | $writePermissions = $this->checkPrivileges($path, '{DAV:}write', self::R_PARENT, false); |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | |
| 61 | 61 | public function propFind(PropFind $propFind, INode $node) { |
| 62 | 62 | /* Overload current-user-principal */ |
| 63 | - $propFind->handle('{DAV:}current-user-principal', function () { |
|
| 63 | + $propFind->handle('{DAV:}current-user-principal', function() { |
|
| 64 | 64 | if ($url = parent::getCurrentUserPrincipal()) { |
| 65 | - return new Principal(Principal::HREF, $url . '/'); |
|
| 65 | + return new Principal(Principal::HREF, $url.'/'); |
|
| 66 | 66 | } else { |
| 67 | 67 | return new Principal(Principal::UNAUTHENTICATED); |
| 68 | 68 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
| 71 | 71 | |
| 72 | 72 | // first time login event setup |
| 73 | - $dispatcher->addListener(IUser::class . '::firstLogin', function ($event) use ($hm) { |
|
| 73 | + $dispatcher->addListener(IUser::class.'::firstLogin', function($event) use ($hm) { |
|
| 74 | 74 | if ($event instanceof GenericEvent) { |
| 75 | 75 | $hm->firstLogin($event->getSubject()); |
| 76 | 76 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $server->on('beforeMethod', [$this, 'beforeMethod']); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ |
|
| 58 | + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { |
|
| 59 | 59 | // verify that the owner didn't have his share permissions revoked |
| 60 | 60 | if ($this->fileInfo && !$this->fileInfo->isShareable()) { |
| 61 | 61 | throw new NotFound(); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $this->enabled = false; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ |
|
| 67 | + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { |
|
| 68 | 68 | |
| 69 | 69 | if (!$this->enabled) { |
| 70 | 70 | return; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $path = array_pop($path); |
| 79 | 79 | |
| 80 | 80 | $newName = \OC_Helper::buildNotExistingFileNameForView('/', $path, $this->view); |
| 81 | - $url = $request->getBaseUrl() . $newName; |
|
| 81 | + $url = $request->getBaseUrl().$newName; |
|
| 82 | 82 | $request->setUrl($url); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | function createDirectory($name) { |
| 43 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
| 43 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | function getChild($name) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function createFile($name, $data = null) { |
| 42 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
| 42 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | function createDirectory($name) { |
@@ -83,10 +83,10 @@ discard block |
||
| 83 | 83 | $rootView = new View(); |
| 84 | 84 | $user = \OC::$server->getUserSession()->getUser(); |
| 85 | 85 | Filesystem::initMountPoints($user->getUID()); |
| 86 | - if (!$rootView->file_exists('/' . $user->getUID() . '/uploads')) { |
|
| 87 | - $rootView->mkdir('/' . $user->getUID() . '/uploads'); |
|
| 86 | + if (!$rootView->file_exists('/'.$user->getUID().'/uploads')) { |
|
| 87 | + $rootView->mkdir('/'.$user->getUID().'/uploads'); |
|
| 88 | 88 | } |
| 89 | - $view = new View('/' . $user->getUID() . '/uploads'); |
|
| 89 | + $view = new View('/'.$user->getUID().'/uploads'); |
|
| 90 | 90 | $rootInfo = $view->getFileInfo(''); |
| 91 | 91 | $impl = new Directory($view, $rootInfo); |
| 92 | 92 | return $impl; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | protected function setSubjects(IEvent $event, $subject, array $parameters) { |
| 50 | 50 | $placeholders = $replacements = []; |
| 51 | 51 | foreach ($parameters as $placeholder => $parameter) { |
| 52 | - $placeholders[] = '{' . $placeholder . '}'; |
|
| 52 | + $placeholders[] = '{'.$placeholder.'}'; |
|
| 53 | 53 | $replacements[] = $parameter['name']; |
| 54 | 54 | } |
| 55 | 55 | |