From c1e4f9f30563d5eda1718d716d631d6092cd4e28 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 23:06:53 +0100 Subject: Use type casting instead of *val() method It should be up to 6x faster Signed-off-by: Morris Jobke --- apps/files_trashbin/lib/Expiration.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/files_trashbin') diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php index 03f126fc415..c7ad4e29f18 100644 --- a/apps/files_trashbin/lib/Expiration.php +++ b/apps/files_trashbin/lib/Expiration.php @@ -142,13 +142,13 @@ class Expiration { $this->canPurgeToSaveSpace = true; } elseif ($minValue !== 'auto' && $maxValue === 'auto') { // Keep for X days but delete anytime if space needed - $this->minAge = intval($minValue); + $this->minAge = (int)$minValue; $this->maxAge = self::NO_OBLIGATION; $this->canPurgeToSaveSpace = true; } elseif ($minValue === 'auto' && $maxValue !== 'auto') { // Delete anytime if space needed, Delete all older than max automatically $this->minAge = self::NO_OBLIGATION; - $this->maxAge = intval($maxValue); + $this->maxAge = (int)$maxValue; $this->canPurgeToSaveSpace = true; } elseif ($minValue !== 'auto' && $maxValue !== 'auto') { // Delete all older than max OR older than min if space needed @@ -158,8 +158,8 @@ class Expiration { $maxValue = $minValue; } - $this->minAge = intval($minValue); - $this->maxAge = intval($maxValue); + $this->minAge = (int)$minValue; + $this->maxAge = (int)$maxValue; $this->canPurgeToSaveSpace = false; } } -- cgit v1.2.3