aboutsummaryrefslogtreecommitdiff
path: root/app/Models/AttributesTrait.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/AttributesTrait.php')
-rw-r--r--app/Models/AttributesTrait.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/AttributesTrait.php b/app/Models/AttributesTrait.php
index e94a973d9..8795d81d9 100644
--- a/app/Models/AttributesTrait.php
+++ b/app/Models/AttributesTrait.php
@@ -15,6 +15,11 @@ trait FreshRSS_AttributesTrait {
return $this->attributes;
}
+ /** @param non-empty-string $key */
+ public function hasAttribute(string $key): bool {
+ return isset($this->attributes[$key]);
+ }
+
/**
* @param non-empty-string $key
* @return array<int|string,mixed>|null