aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-30 12:43:39 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-30 12:43:39 +0100
commit4d6ab45b03031e1c13ac2d3589364a43a0fe5578 (patch)
tree92fcd795eb44fb89c0b95676ce30b303eb415542 /app/Models/Entry.php
parent3cc073f2d1dd4a5fef5d66e6f30c4496bf2e6421 (diff)
Micro-optimisation : évite is_null et quelques if/else
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/303
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index ab9605eb1..83f68ce78 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -38,11 +38,7 @@ class FreshRSS_Entry extends Minz_Model {
return $this->title;
}
public function author () {
- if (is_null ($this->author)) {
- return '';
- } else {
- return $this->author;
- }
+ return $this->author === null ? '' : $this->author;
}
public function content () {
return $this->content;