From d2247221bbf23a8fe19f66ea4ad7d0a59ffaa5b4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 1 Aug 2024 20:31:40 +0200 Subject: Minor update whitespace PHPCS rules (#6666) * Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules --- app/Models/Entry.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index ada6e9944..cd7b27291 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -393,7 +393,7 @@ HTML; return timestamptodate($this->date); } public function machineReadableDate(): string { - return @date (DATE_ATOM, $this->date); + return @date(DATE_ATOM, $this->date); } public function lastSeen(): int { @@ -728,17 +728,17 @@ HTML; public function isDay(int $day, int $today): bool { $date = $this->dateAdded(true); switch ($day) { - case FreshRSS_Days::TODAY: - $tomorrow = $today + 86400; - return $date >= $today && $date < $tomorrow; - case FreshRSS_Days::YESTERDAY: - $yesterday = $today - 86400; - return $date >= $yesterday && $date < $today; - case FreshRSS_Days::BEFORE_YESTERDAY: - $yesterday = $today - 86400; - return $date < $yesterday; - default: - return false; + case FreshRSS_Days::TODAY: + $tomorrow = $today + 86400; + return $date >= $today && $date < $tomorrow; + case FreshRSS_Days::YESTERDAY: + $yesterday = $today - 86400; + return $date >= $yesterday && $date < $today; + case FreshRSS_Days::BEFORE_YESTERDAY: + $yesterday = $today - 86400; + return $date < $yesterday; + default: + return false; } } -- cgit v1.2.3