Phosphorum\Models\Posts::getBounty PHP Method

getBounty() public method

Calculates a bounty for the post
public getBounty ( ) : array | boolean
return array | boolean
    public function getBounty()
    {
        $diff = time() - $this->created_at;
        if ($diff > 86400) {
            if ($diff < 86400 * 30) {
                return ['type' => 'old', 'value' => 150 + intval($diff / 86400 * 3)];
            }
        } elseif ($diff < 3600) {
            return ['type' => 'fast-reply', 'value' => 100];
        }
        return false;
    }