Skip to content

Commit

Permalink
Merge pull request #30075 from nextcloud/logic-op
Browse files Browse the repository at this point in the history
Switch logical operators
  • Loading branch information
ChristophWurst authored Dec 9, 2021
2 parents 2e869fd + 074a9a5 commit 8420431
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function get($file) {
$query = $this->getQueryBuilder();
$query->selectFileCache();

if (is_string($file) or $file == '') {
if (is_string($file) || $file == '') {
// normalize file
$file = $this->normalize($file);

Expand All @@ -166,7 +166,7 @@ public function get($file) {
$result->closeCursor();

//merge partial data
if (!$data and is_string($file) and isset($this->partial[$file])) {
if (!$data && is_string($file) && isset($this->partial[$file])) {
return $this->partial[$file];
} elseif (!$data) {
return $data;
Expand Down Expand Up @@ -819,7 +819,7 @@ public function correctFolderSize($path, $data = null, $isBackgroundScan = false
$this->calculateFolderSize($path, $data);
if ($path !== '') {
$parent = dirname($path);
if ($parent === '.' or $parent === '/') {
if ($parent === '.' || $parent === '/') {
$parent = '';
}
if ($isBackgroundScan) {
Expand Down Expand Up @@ -865,7 +865,7 @@ public function getIncompleteChildrenCount($fileId) {
*/
public function calculateFolderSize($path, $entry = null) {
$totalSize = 0;
if (is_null($entry) or !isset($entry['fileid'])) {
if (is_null($entry) || !isset($entry['fileid'])) {
$entry = $this->get($path);
}
if (isset($entry['mimetype']) && $entry['mimetype'] === FileInfo::MIMETYPE_FOLDER) {
Expand Down

0 comments on commit 8420431

Please sign in to comment.