-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RENT SMS command implemented, success and error notifications added
- Loading branch information
Showing
16 changed files
with
521 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace BikeShare\Http\Services\Rents\Exceptions; | ||
|
||
class RentException extends \LogicException | ||
{ | ||
/** | ||
* @var RentExceptionType | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* @var mixed | ||
*/ | ||
public $param1; | ||
|
||
/** | ||
* @var mixed | ||
*/ | ||
public $param2; | ||
|
||
/** | ||
* RentException constructor. | ||
* @param RentExceptionType $type | ||
* @param null|mixed $param1 | ||
* @param null|mixed $param2 | ||
*/ | ||
public function __construct(RentExceptionType $type, $param1 = null, $param2 = null) | ||
{ | ||
$this->type = $type; | ||
$this->param1 = $param1; | ||
$this->param2 = $param2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace BikeShare\Http\Services\Rents\Exceptions; | ||
|
||
use MyCLabs\Enum\Enum; | ||
|
||
class RentExceptionType extends Enum | ||
{ | ||
const BIKE_NOT_FREE = 1; | ||
const MAXIMUM_NUMBER_OF_RENTS = 2; | ||
const BIKE_NOT_ON_TOP = 3; | ||
const LOW_CREDIT = 4; | ||
} |
Oops, something went wrong.