| 1 | <?php |
||
| 7 | class Minutes |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var |
||
| 11 | */ |
||
| 12 | private $minutes; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var |
||
| 16 | */ |
||
| 17 | private $start; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var |
||
| 21 | */ |
||
| 22 | private $end; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Minutes constructor. |
||
| 26 | * |
||
| 27 | * @param $minutes |
||
| 28 | */ |
||
| 29 | public function __construct($minutes = null) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Calculate start and end dates. |
||
| 48 | */ |
||
| 49 | private function calculateStartEnd() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | public function getEnd() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return mixed |
||
| 70 | */ |
||
| 71 | public function getMinutes() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return mixed |
||
| 78 | */ |
||
| 79 | public function getStart() |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param $minutes |
||
| 86 | * |
||
| 87 | * @return static |
||
| 88 | */ |
||
| 89 | public static function make($minutes) |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @param mixed $end |
||
| 96 | */ |
||
| 97 | public function setEnd($end) |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @param mixed $start |
||
| 104 | */ |
||
| 105 | public function setStart($start) |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Today. |
||
| 112 | */ |
||
| 113 | private function setToday() |
||
| 119 | } |
||
| 120 |