diff --git a/src/V3/DatetimeVariable.php b/src/V3/DatetimeVariable.php index 884a46a..754d231 100644 --- a/src/V3/DatetimeVariable.php +++ b/src/V3/DatetimeVariable.php @@ -55,8 +55,11 @@ public function init(...$params) $this->_hms->init($show_seconds); } - public function isValid(Horde_Variables|Variables $vars, $date): bool + public function isValid(Horde_Variables|Variables $vars, $value): bool { + /* Local alias keeps the parameter name aligned with the parent and + * sibling subclasses while preserving the original body wording. */ + $date = $value; /* Require all fields if one field is not empty */ if ($this->isRequired() || $this->emptyDateArray($date) != 1 || !$this->emptyTimeArray($date)) { $mdy_valid = $this->_mdy->isValid($vars, $date); diff --git a/src/V3/HourminutesecondVariable.php b/src/V3/HourminutesecondVariable.php index dfee75c..060f572 100644 --- a/src/V3/HourminutesecondVariable.php +++ b/src/V3/HourminutesecondVariable.php @@ -34,8 +34,11 @@ public function init(...$params) $this->_show_seconds = $params[0] ?? false; } - public function isValid(Horde_Variables|Variables $vars, $time): bool + public function isValid(Horde_Variables|Variables $vars, $value): bool { + /* Local alias keeps the parameter name aligned with the parent and + * sibling subclasses while preserving the original body wording. */ + $time = $value; if (!is_array($time)) { if ($this->isRequired()) { return $this->invalid('Please enter a valid time.'); diff --git a/src/V3/MonthdayyearVariable.php b/src/V3/MonthdayyearVariable.php index e620f9f..36e19fc 100644 --- a/src/V3/MonthdayyearVariable.php +++ b/src/V3/MonthdayyearVariable.php @@ -64,8 +64,11 @@ public function init(...$params) $this->_format_out = $format_out; } - public function isValid(Horde_Variables|Variables $vars, $date): bool + public function isValid(Horde_Variables|Variables $vars, $value): bool { + /* Local alias keeps the parameter name aligned with the parent and + * sibling subclasses while preserving the original body wording. */ + $date = $value; if (!is_array($date)) { if ($this->isRequired() && empty($date)) { return $this->invalid('This field is required.');