Skip to content

Commit

Permalink
Rate Interface Methods #42
Browse files Browse the repository at this point in the history
  • Loading branch information
chx2 committed Mar 10, 2021
1 parent b6d1294 commit 72c7d93
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/Models/Rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,19 @@ protected static function boot()
});
}

public function getRouteKeyName()
public function getSlug()
{
return 'slug';
// @todo Slug Interface method
}

/**
* Generate amount.
*
* @param int $participants
* @param bool $isPrivate
* @return int
*/
public function getAmount(int $participants, bool $isPrivate)
public function getAmount()
{
$key = ($isPrivate) ? 'private_' : 'public_';
$key = $key.$participants;
// @todo Amount Interface method
}

return $this->$key * $participants;
public function getRouteKeyName()
{
return 'slug';
}

public function creator()
Expand Down

0 comments on commit 72c7d93

Please sign in to comment.