@@ -16,6 +16,8 @@ trait HasSchedule
16
16
17
17
/**
18
18
* Returns a morphOne relationship class of the schedule.
19
+ *
20
+ * @return morphOne The relatinship.
19
21
*/
20
22
public function schedule ()
21
23
{
@@ -24,6 +26,8 @@ public function schedule()
24
26
25
27
/**
26
28
* Get the Schedule array or null if it doesn't have.
29
+ *
30
+ * @return array|null The array with schedules or null.
27
31
*/
28
32
public function getSchedule ()
29
33
{
@@ -32,6 +36,8 @@ public function getSchedule()
32
36
33
37
/**
34
38
* Get the Exclusions array or null if it doesn't have.
39
+ *
40
+ * @return array The array with exclusions.
35
41
*/
36
42
public function getExclusions ()
37
43
{
@@ -40,6 +46,8 @@ public function getExclusions()
40
46
41
47
/**
42
48
* Check if the model has a schedule set.
49
+ *
50
+ * @return boolean If the binded model has a schedule already set.
43
51
*/
44
52
public function hasSchedule ()
45
53
{
@@ -48,6 +56,9 @@ public function hasSchedule()
48
56
49
57
/**
50
58
* Set a new schedule.
59
+ *
60
+ * @param array $scheduleArray The array with schedules.
61
+ * @return array The schedule array.
51
62
*/
52
63
public function setSchedule (array $ scheduleArray = [])
53
64
{
@@ -66,6 +77,9 @@ public function setSchedule(array $scheduleArray = [])
66
77
67
78
/**
68
79
* Update the model's schedule.
80
+ *
81
+ * @param array $scheduleArray The array with schedules that should be replaced.
82
+ * @return array The schedule array.
69
83
*/
70
84
public function updateSchedule (array $ scheduleArray )
71
85
{
@@ -78,6 +92,9 @@ public function updateSchedule(array $scheduleArray)
78
92
79
93
/**
80
94
* Set exclusions.
95
+ *
96
+ * @param array $exclusionsArray The array with exclusions.
97
+ * @return array The exclusions array.
81
98
*/
82
99
public function setExclusions (array $ exclusionsArray = [])
83
100
{
@@ -94,6 +111,9 @@ public function setExclusions(array $exclusionsArray = [])
94
111
95
112
/**
96
113
* Update exclusions (alias for setExclusions).
114
+ *
115
+ * @param array $exclusionsArray The array with exclusions.
116
+ * @return array The exclusions array.
97
117
*/
98
118
public function updateExclusions (array $ exclusionsArray )
99
119
{
@@ -102,6 +122,8 @@ public function updateExclusions(array $exclusionsArray)
102
122
103
123
/**
104
124
* Delete the schedule of this model.
125
+ *
126
+ * @return bool Wether the schedule was deleted or not.
105
127
*/
106
128
public function deleteSchedule ()
107
129
{
@@ -110,6 +132,8 @@ public function deleteSchedule()
110
132
111
133
/**
112
134
* Delete the exclusions of this model.
135
+ *
136
+ * @return bool|array Wether the exclusions were cleared or not.
113
137
*/
114
138
public function deleteExclusions ()
115
139
{
@@ -126,6 +150,9 @@ public function deleteExclusions()
126
150
127
151
/**
128
152
* Check if the model is available on a certain day/date.
153
+ *
154
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
155
+ * @return bool Wether it is available on that day.
129
156
*/
130
157
public function isAvailableOn ($ dateOrDay )
131
158
{
@@ -162,6 +189,9 @@ public function isAvailableOn($dateOrDay)
162
189
163
190
/**
164
191
* Check if the model is unavailable on a certain day/date.
192
+ *
193
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
194
+ * @return bool Wether it is unavailable on that day.
165
195
*/
166
196
public function isUnavailableOn ($ dateOrDay )
167
197
{
@@ -170,6 +200,10 @@ public function isUnavailableOn($dateOrDay)
170
200
171
201
/**
172
202
* Check if the model is available on a certain day/date and time.
203
+ *
204
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
205
+ * @param string The time.
206
+ * @return bool Wether it is available on that day, at a certain time.
173
207
*/
174
208
public function isAvailableOnAt ($ dateOrDay , $ time )
175
209
{
@@ -212,6 +246,10 @@ public function isAvailableOnAt($dateOrDay, $time)
212
246
213
247
/**
214
248
* Check if the model is unavailable on a certain day/date and time.
249
+ *
250
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
251
+ * @param string The time.
252
+ * @return bool Wether it is unavailable on that day, at a certain time.
215
253
*/
216
254
public function isUnavailableOnAt ($ dateOrDay , $ time )
217
255
{
@@ -220,6 +258,9 @@ public function isUnavailableOnAt($dateOrDay, $time)
220
258
221
259
/**
222
260
* Get the amount of hours on a certain day.
261
+ *
262
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
263
+ * @return int The amount of hours on that day.
223
264
*/
224
265
public function getHoursOn ($ dateOrDay )
225
266
{
@@ -261,6 +302,9 @@ public function getHoursOn($dateOrDay)
261
302
262
303
/**
263
304
* Get the amount of minutes on a certain day.
305
+ *
306
+ * @param string|Carbon|DateTime $dateOrDay The datetime, date or the day.
307
+ * @return int The amount of minutes on that day.
264
308
*/
265
309
public function getMinutesOn ($ dateOrDay )
266
310
{
0 commit comments