From f99c8d5f54c67e0abc3f3189b4f5e3e4571e114c Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:04:06 +0200 Subject: Modernize code to php7.4 (#6043) * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Consistency --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/Models/Entry.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 956134c78..2325252f7 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -244,12 +244,12 @@ HTML; $content .= '

'; } elseif ($medium === 'audio' || strpos($mime, 'audio') === 0) { $content .= '

💾

'; } elseif ($medium === 'video' || strpos($mime, 'video') === 0) { $content .= '

💾

'; } else { //e.g. application, text, unknown @@ -401,10 +401,10 @@ HTML; if ($microsecond) { return $this->date_added; } else { - return intval(substr($this->date_added, 0, -6)); + return (int)substr($this->date_added, 0, -6); } } else { - $date = intval(substr($this->date_added, 0, -6)); + $date = (int)substr($this->date_added, 0, -6); return timestamptodate($date); } } @@ -519,7 +519,7 @@ HTML; } /** @param int|string $value */ public function _date($value): void { - $value = intval($value); + $value = (int)$value; $this->date = $value > 1 ? $value : time(); } @@ -552,7 +552,7 @@ HTML; /** @param int|string $id */ private function _feedId($id): void { $this->feed = null; - $this->feedId = intval($id); + $this->feedId = (int)$id; } /** @param array|string $value */ @@ -966,7 +966,7 @@ HTML; (self::enclosureIsImage($enclosure) ? 'image' : ''), ]; if (!empty($enclosure['length'])) { - $media['length'] = intval($enclosure['length']); + $media['length'] = (int)$enclosure['length']; } $item['enclosure'][] = $media; } -- cgit v1.2.3