aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 86b3899d8..7e10367fa 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -1,11 +1,11 @@
<?php
class FreshRSS_Entry extends Minz_Model {
- const STATE_READ = 1;
- const STATE_NOT_READ = 2;
- const STATE_ALL = 3;
- const STATE_FAVORITE = 4;
- const STATE_NOT_FAVORITE = 8;
+ public const STATE_READ = 1;
+ public const STATE_NOT_READ = 2;
+ public const STATE_ALL = 3;
+ public const STATE_FAVORITE = 4;
+ public const STATE_NOT_FAVORITE = 8;
/** @var string */
private $id = '0';
@@ -143,7 +143,7 @@ class FreshRSS_Entry extends Minz_Model {
$medium = $enclosure['medium'] ?? '';
$mime = $enclosure['type'] ?? '';
- return $elink != '' && $medium === 'image' || strpos($mime, 'image') === 0 ||
+ return ($elink != '' && $medium === 'image') || strpos($mime, 'image') === 0 ||
($mime == '' && $length == 0 && preg_match('/[.](avif|gif|jpe?g|png|svg|webp)$/i', $elink));
}
@@ -800,7 +800,7 @@ HTML;
* 'hash':string,'is_read':?bool,'is_favorite':?bool,'id_feed':int,'tags':string,'attributes':array<string,mixed>}
*/
public function toArray(): array {
- return array(
+ return [
'id' => $this->id(),
'guid' => $this->guid(),
'title' => $this->title(),
@@ -815,7 +815,7 @@ HTML;
'id_feed' => $this->feedId(),
'tags' => $this->tags(true),
'attributes' => $this->attributes(),
- );
+ ];
}
/**
@@ -833,7 +833,7 @@ HTML;
* Some clients (tested with News+) would fail if sending too long item content
* @var int
*/
- const API_MAX_COMPAT_CONTENT_LENGTH = 500000;
+ public const API_MAX_COMPAT_CONTENT_LENGTH = 500000;
/**
* N.B.: To avoid expensive lookups, ensure to set `$entry->_feed($feed)` before calling this function.