summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 15:12:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 20:25:24 +0200
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/files_trashbin
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
downloadnextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz
nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/Expiration.php2
-rw-r--r--apps/files_trashbin/lib/Helper.php2
-rw-r--r--apps/files_trashbin/tests/Command/CleanUpTest.php2
-rw-r--r--apps/files_trashbin/tests/ExpirationTest.php18
4 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php
index c861960074f..554f083e853 100644
--- a/apps/files_trashbin/lib/Expiration.php
+++ b/apps/files_trashbin/lib/Expiration.php
@@ -92,7 +92,7 @@ class Expiration {
$time = $this->timeFactory->getTime();
// Never expire dates in future e.g. misconfiguration or negative time
// adjustment
- if ($time<$timestamp) {
+ if ($time < $timestamp) {
return false;
}
diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php
index 31ebdfa265e..e8fc38c2a35 100644
--- a/apps/files_trashbin/lib/Helper.php
+++ b/apps/files_trashbin/lib/Helper.php
@@ -76,7 +76,7 @@ class Helper {
$timestamp = substr(pathinfo($parts[0], PATHINFO_EXTENSION), 1);
}
$originalPath = '';
- $originalName = substr($entryName, 0, -strlen($timestamp)-2);
+ $originalName = substr($entryName, 0, -strlen($timestamp) - 2);
if (isset($originalLocations[$originalName][$timestamp])) {
$originalPath = $originalLocations[$originalName][$timestamp];
if (substr($originalPath, -1) === '/') {
diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php
index 2984645777b..d7a654e519d 100644
--- a/apps/files_trashbin/tests/Command/CleanUpTest.php
+++ b/apps/files_trashbin/tests/Command/CleanUpTest.php
@@ -86,7 +86,7 @@ class CleanUpTest extends TestCase {
'id' => $query->expr()->literal('file'.$i),
'timestamp' => $query->expr()->literal($i),
'location' => $query->expr()->literal('.'),
- 'user' => $query->expr()->literal('user'.$i%2)
+ 'user' => $query->expr()->literal('user'.$i % 2)
])->execute();
}
$getAllQuery = $this->dbConnection->getQueryBuilder();
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php
index d3055c73aee..9c9ef72e46f 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -34,14 +34,14 @@ class ExpirationTest extends \Test\TestCase {
public const FAKE_TIME_NOW = 1000000;
public function expirationData() {
- $today = 100*self::SECONDS_PER_DAY;
- $back10Days = (100-10)*self::SECONDS_PER_DAY;
- $back20Days = (100-20)*self::SECONDS_PER_DAY;
- $back30Days = (100-30)*self::SECONDS_PER_DAY;
- $back35Days = (100-35)*self::SECONDS_PER_DAY;
+ $today = 100 * self::SECONDS_PER_DAY;
+ $back10Days = (100 - 10) * self::SECONDS_PER_DAY;
+ $back20Days = (100 - 20) * self::SECONDS_PER_DAY;
+ $back30Days = (100 - 30) * self::SECONDS_PER_DAY;
+ $back35Days = (100 - 35) * self::SECONDS_PER_DAY;
// it should never happen, but who knows :/
- $ahead100Days = (100+100)*self::SECONDS_PER_DAY;
+ $ahead100Days = (100 + 100) * self::SECONDS_PER_DAY;
return [
// Expiration is disabled - always should return false
@@ -158,10 +158,10 @@ class ExpirationTest extends \Test\TestCase {
[ 'auto', false ],
[ 'auto,auto', false ],
[ 'auto, auto', false ],
- [ 'auto, 3', self::FAKE_TIME_NOW - (3*self::SECONDS_PER_DAY) ],
+ [ 'auto, 3', self::FAKE_TIME_NOW - (3 * self::SECONDS_PER_DAY) ],
[ '5, auto', false ],
- [ '3, 5', self::FAKE_TIME_NOW - (5*self::SECONDS_PER_DAY) ],
- [ '10, 3', self::FAKE_TIME_NOW - (10*self::SECONDS_PER_DAY) ],
+ [ '3, 5', self::FAKE_TIME_NOW - (5 * self::SECONDS_PER_DAY) ],
+ [ '10, 3', self::FAKE_TIME_NOW - (10 * self::SECONDS_PER_DAY) ],
];
}