@@ -1037,6 +1037,11 @@ public function setTaskName(string $name) : bool {
10371037
10381038 return false ;
10391039 }
1040+ /**
1041+ * Converts task to JSON with all task properties and time information.
1042+ *
1043+ * @return Json JSON object containing task data.
1044+ */
10401045 public function toJSON () : Json {
10411046 $ json = new Json ([
10421047 'name ' => $ this ->getTaskName (),
@@ -1330,6 +1335,13 @@ private function checkMonthHelper(string $monthField) {
13301335
13311336 return $ monthAttrs ;
13321337 }
1338+ /**
1339+ * Creates standard time attributes structure for scheduling.
1340+ *
1341+ * @param string $suffix The suffix for attribute names (e.g., 'hour', 'minute').
1342+ *
1343+ * @return array Standard attributes array with every, every-x, at-every-x, and at-range keys.
1344+ */
13331345 private function createAttrs ($ suffix ): array {
13341346 return [
13351347 // *
@@ -1388,6 +1400,13 @@ private function dayOfMonthHelper(string $dayOfMonthField) {
13881400 return $ monthDaysAttrs ;
13891401 }
13901402
1403+ /**
1404+ * Gets argument value from HTTP request parameters.
1405+ *
1406+ * @param string $name The argument name to retrieve.
1407+ *
1408+ * @return mixed|null The argument value or null if not found.
1409+ */
13911410 private function getArgValFromRequest ($ name ) {
13921411 if (Runner::isCLI ()) {
13931412 return null ;
@@ -1401,6 +1420,13 @@ private function getArgValFromRequest($name) {
14011420
14021421 return $ retVal ;
14031422 }
1423+ /**
1424+ * Gets argument value from CLI command.
1425+ *
1426+ * @param string $name The argument name to retrieve.
1427+ *
1428+ * @return mixed|null The argument value or null if not found.
1429+ */
14041430 private function getArgValFromTerminal ($ name ) {
14051431 $ c = $ this ->getCommand ();
14061432
@@ -1454,6 +1480,14 @@ private function getSubExprType(string $expr): string {
14541480
14551481 return $ retVal ;
14561482 }
1483+ /**
1484+ * Checks if current hour matches scheduling rules (exact or interval-based).
1485+ *
1486+ * @param array $hoursArr Array containing hour scheduling configuration.
1487+ * @param int $current The current hour to check.
1488+ *
1489+ * @return bool True if hour matches scheduling rules.
1490+ */
14571491 private function isHourHelper ($ hoursArr , $ current ) {
14581492 $ hours = $ hoursArr ['at-every-x-hour ' ];
14591493 $ retVal = in_array ($ current , $ hours );
@@ -1471,6 +1505,14 @@ private function isHourHelper($hoursArr, $current) {
14711505
14721506 return $ retVal ;
14731507 }
1508+ /**
1509+ * Checks if current minute matches scheduling rules (exact or interval-based).
1510+ *
1511+ * @param array $minuteArr Array containing minute scheduling configuration.
1512+ * @param int $current The current minute to check.
1513+ *
1514+ * @return bool True if minute matches scheduling rules.
1515+ */
14741516 private function isMinuteHelper ($ minuteArr , $ current ) {
14751517 $ minutes = $ minuteArr ['at-every-x-minute ' ];
14761518 $ retVal = in_array ($ current , $ minutes );
0 commit comments