| @@ -11,9 +11,9 @@ | ||
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * Holds the Indexable instance. |
| 14 | 14 | * |
| 15 | - * @var Indexable | |
| 15 | + * @var Indexable|null | |
| 16 | 16 | */ |
| 17 | 17 | protected $indexable = null; |
| 18 | 18 | |
| 19 | 19 | /** |
| @@ -21,11 +21,9 @@ | ||
| 21 | 21 | * |
| 22 | 22 | * @return Indexable The indexable. |
| 23 | 23 | */ |
| 24 | 24 | public function indexable() { |
| 25 | - if ( $this->indexable === null ) { | |
| 26 | - $this->indexable = $this->belongs_to( 'Indexable', 'indexable_id', 'id' )->find_one(); | |
| 27 | - } | |
| 25 | + $this->indexable ??= $this->belongs_to( 'Indexable', 'indexable_id', 'id' )->find_one(); | |
| 28 | 26 | |
| 29 | 27 | return $this->indexable; |
| 30 | 28 | } |
| 31 | 29 | } |