@@ -69,7 +69,7 @@ |
||
| 69 | 69 | public function stopQuery() { |
| 70 | 70 | if ($this->activated && $this->activeQuery) { |
| 71 | 71 | $this->activeQuery->end(microtime(true)); |
| 72 | - $this->queries[(string)$this->index] = $this->activeQuery; |
|
| 72 | + $this->queries[(string) $this->index] = $this->activeQuery; |
|
| 73 | 73 | $this->index++; |
| 74 | 74 | $this->activeQuery = null; |
| 75 | 75 | } |
@@ -99,14 +99,14 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | |
| 101 | 101 | // filter out excluded shares and group shares that includes self |
| 102 | - $shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) { |
|
| 102 | + $shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) { |
|
| 103 | 103 | return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID(); |
| 104 | 104 | }); |
| 105 | 105 | |
| 106 | 106 | $superShares = $this->buildSuperShares($shares, $user); |
| 107 | 107 | |
| 108 | 108 | $mounts = []; |
| 109 | - $view = new View('/' . $user->getUID() . '/files'); |
|
| 109 | + $view = new View('/'.$user->getUID().'/files'); |
|
| 110 | 110 | $ownerViews = []; |
| 111 | 111 | $sharingDisabledForUser = $this->shareManager->sharingDisabledForUser($user->getUID()); |
| 112 | 112 | /** @var CappedMemoryCache<bool> $folderExistCache */ |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $owner = $parentShare->getShareOwner(); |
| 127 | 127 | if (!isset($ownerViews[$owner])) { |
| 128 | - $ownerViews[$owner] = new View('/' . $parentShare->getShareOwner() . '/files'); |
|
| 128 | + $ownerViews[$owner] = new View('/'.$parentShare->getShareOwner().'/files'); |
|
| 129 | 129 | } |
| 130 | 130 | $mount = new SharedMount( |
| 131 | 131 | '\OCA\Files_Sharing\SharedStorage', |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $result = []; |
| 185 | 185 | // sort by stime, the super share will be based on the least recent share |
| 186 | 186 | foreach ($tmp as &$tmp2) { |
| 187 | - @usort($tmp2, function ($a, $b) { |
|
| 187 | + @usort($tmp2, function($a, $b) { |
|
| 188 | 188 | $aTime = $a->getShareTime()->getTimestamp(); |
| 189 | 189 | $bTime = $b->getShareTime()->getTimestamp(); |
| 190 | 190 | if ($aTime === $bTime) { |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | // null groups which usually appear with group backend |
| 252 | 252 | // caching inconsistencies |
| 253 | 253 | $this->logger->debug( |
| 254 | - 'Could not adjust share target for share ' . $share->getId() . ' to make it consistent: ' . $e->getMessage(), |
|
| 254 | + 'Could not adjust share target for share '.$share->getId().' to make it consistent: '.$e->getMessage(), |
|
| 255 | 255 | ['app' => 'files_sharing'] |
| 256 | 256 | ); |
| 257 | 257 | } |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | $operations = []; |
| 354 | 354 | while (($opId = $result->fetchOne()) !== false) { |
| 355 | - $operations[] = (int)$opId; |
|
| 355 | + $operations[] = (int) $opId; |
|
| 356 | 356 | } |
| 357 | 357 | $this->operationsByScope[$scopeContext->getHash()] = $operations; |
| 358 | 358 | $result->closeCursor(); |
@@ -425,12 +425,12 @@ discard block |
||
| 425 | 425 | $query = $this->connection->getQueryBuilder(); |
| 426 | 426 | try { |
| 427 | 427 | $this->connection->beginTransaction(); |
| 428 | - $result = (bool)$query->delete('flow_operations') |
|
| 428 | + $result = (bool) $query->delete('flow_operations') |
|
| 429 | 429 | ->where($query->expr()->eq('id', $query->createNamedParameter($id))) |
| 430 | 430 | ->execute(); |
| 431 | 431 | if ($result) { |
| 432 | 432 | $qb = $this->connection->getQueryBuilder(); |
| 433 | - $result &= (bool)$qb->delete('flow_operations_scope') |
|
| 433 | + $result &= (bool) $qb->delete('flow_operations_scope') |
|
| 434 | 434 | ->where($qb->expr()->eq('operation_id', $qb->createNamedParameter($id))) |
| 435 | 435 | ->execute(); |
| 436 | 436 | } |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | throw new \UnexpectedValueException($this->l->t('At least one check needs to be provided')); |
| 504 | 504 | } |
| 505 | 505 | |
| 506 | - if (strlen((string)$operation) > IManager::MAX_OPERATION_VALUE_BYTES) { |
|
| 506 | + if (strlen((string) $operation) > IManager::MAX_OPERATION_VALUE_BYTES) { |
|
| 507 | 507 | throw new \UnexpectedValueException($this->l->t('The provided operation data is too long')); |
| 508 | 508 | } |
| 509 | 509 | |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | throw new \UnexpectedValueException($this->l->t('Check %s is not allowed with this entity', [$class])); |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | - if (strlen((string)$check['value']) > IManager::MAX_CHECK_VALUE_BYTES) { |
|
| 534 | + if (strlen((string) $check['value']) > IManager::MAX_CHECK_VALUE_BYTES) { |
|
| 535 | 535 | throw new \UnexpectedValueException($this->l->t('The provided check value is too long')); |
| 536 | 536 | } |
| 537 | 537 | |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | * @return int Check unique ID |
| 588 | 588 | */ |
| 589 | 589 | protected function addCheck($class, $operator, $value) { |
| 590 | - $hash = md5($class . '::' . $operator . '::' . $value); |
|
| 590 | + $hash = md5($class.'::'.$operator.'::'.$value); |
|
| 591 | 591 | |
| 592 | 592 | $query = $this->connection->getQueryBuilder(); |
| 593 | 593 | $query->select('id') |