public function setCost($cost)
    {
        if ($cost < 4 || $cost > 31) {
            throw new \InvalidArgumentException(sprintf("Invalid bcrypt cost parameter specified: %s", $cost));
        }
        $this->cost = $cost;
        return $this;
    }
public function setCost($cost)
    {
        if ($cost < 4 || $cost > 31) {
            throw new \InvalidArgumentException(sprintf("Invalid bcrypt cost parameter specified: %s", $cost));
        }
        $this->cost = $cost;
        return $this;
    }
public function setCost ( $ cost ) { if ( $ cost < 4 || $ cost > 31 ) { throw new \ InvalidArgumentException ( sprintf ( "Invalid bcrypt cost parameter specified: %s" , $ cost ) ) ; } $ this -> cost = $ cost ; return $ this ; }
Set the cost parameter for bcrypt

@param int $cost
@return $this
@throws \InvalidArgumentException
Set the cost parameter for bcrypt