Skip to content

Commit

Permalink
Merge pull request #20 from yabhq/feat/purchaseable-display-name
Browse files Browse the repository at this point in the history
Ensure that purchaseable items have a display name
  • Loading branch information
jimhlad authored Apr 26, 2021
2 parents 954040e + 6a31b8e commit 1a8dc31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Contracts/Purchaseable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ interface Purchaseable
public function getIdentifier() : mixed;
public function getType() : string;
public function getRetailPrice() : float;
public function getDisplayName() : string;
}
10 changes: 10 additions & 0 deletions src/Traits/Purchaseable.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ public function getRetailPrice() : float
{
return $this->price;
}

/**
* Get the display name of this purchaseable item.
*
* @return string
*/
public function getDisplayName() : string
{
return $this->name;
}
}

0 comments on commit 1a8dc31

Please sign in to comment.