Update CanBeBought.php

This commit is contained in:
Patrick
2022-01-18 00:24:11 +01:00
committed by GitHub
parent c2f92ae9f0
commit 2e23535593

View File

@@ -19,18 +19,16 @@ trait CanBeBought
* *
* @return string * @return string
*/ */
public function getBuyableDescription() public function getBuyableDescription() : ?string
{ {
if (($name = $this->getAttribute('name'))) { if (($name = $this->getAttribute('name'))) {
return $name; return $name;
} } else if (($title = $this->getAttribute('title'))) {
if (($title = $this->getAttribute('title'))) {
return $title; return $title;
} } else if (($description = $this->getAttribute('description'))) {
if (($description = $this->getAttribute('description'))) {
return $description; return $description;
} else {
return null;
} }
} }