* @param mixed $offset
* @return mixed
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset) {
try {
$prop = $this->handleLegacyPropNames($offset);
* @param mixed $offset
* @param mixed $value
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
try {
$prop = $this->handleLegacyPropNames($offset);
}
*
* @param mixed $offset
*/
- public function offsetUnset ($offset) {
+ public function offsetUnset ($offset): void {
$prop = $this->handleLegacyPropNames($offset);
unset($this->props['default'][$prop]);
}
* @param string $label e.g. 'default'
*/
public function setRecurFrequencyUnit($recurFrequencyUnit, $label = 'default') {
- if (!preg_match('/^day|week|month|year$/', $recurFrequencyUnit)) {
+ if (!preg_match('/^day|week|month|year$/', ($recurFrequencyUnit ?? ''))) {
throw new \InvalidArgumentException("recurFrequencyUnit must be day|week|month|year");
}
return $this->set('recurFrequencyUnit', $label, $recurFrequencyUnit);
if ($input === '') {
$input = NULL;
}
- if (strlen($input) > 255 || in_array($input, [FALSE, 0], TRUE)) {
+ if (strlen($input ?? '') > 255 || in_array($input, [FALSE, 0], TRUE)) {
throw new \InvalidArgumentException('processorID field has max length of 255');
}
return $this->set('recurProcessorID', $label, $input);