diff options
| author | 2013-12-30 12:43:39 +0100 | |
|---|---|---|
| committer | 2013-12-30 12:43:39 +0100 | |
| commit | 4d6ab45b03031e1c13ac2d3589364a43a0fe5578 (patch) | |
| tree | 92fcd795eb44fb89c0b95676ce30b303eb415542 /app/Models/Entry.php | |
| parent | 3cc073f2d1dd4a5fef5d66e6f30c4496bf2e6421 (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.php | 6 |
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; |
