1 | <?php |
||
10 | class Quota |
||
11 | { |
||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | protected $total; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $used; |
||
21 | |||
22 | /** |
||
23 | * @var Carbon |
||
24 | */ |
||
25 | protected $checked; |
||
26 | |||
27 | /** |
||
28 | * Quota constructor. |
||
29 | * |
||
30 | * @param $total |
||
31 | * @param $used |
||
32 | */ |
||
33 | public function __construct( $total, $used ) |
||
39 | |||
40 | /** |
||
41 | * @return int |
||
42 | */ |
||
43 | public function getTotal() |
||
47 | |||
48 | /** |
||
49 | * @return int |
||
50 | */ |
||
51 | public function getUsed() |
||
55 | |||
56 | /** |
||
57 | * @return int |
||
58 | */ |
||
59 | public function getAvailable() |
||
63 | |||
64 | /** |
||
65 | * @return float|int |
||
66 | */ |
||
67 | public function getPercentFull() |
||
73 | |||
74 | /** |
||
75 | * @return Carbon |
||
76 | */ |
||
77 | public function getCheckedAt() |
||
81 | |||
82 | /** |
||
83 | * @return array |
||
84 | */ |
||
85 | public function toArray() |
||
95 | } |