diff --git a/core/oql/oql-parser.php b/core/oql/oql-parser.php index 83fe29aa6..0c2c80b74 100644 --- a/core/oql/oql-parser.php +++ b/core/oql/oql-parser.php @@ -33,17 +33,17 @@ class OQLParser_yyToken implements ArrayAccess return $this->string; } - function offsetExists($offset) + function offsetExists($offset): bool { return isset($this->metadata[$offset]); } - function offsetGet($offset) + function offsetGet($offset): mixed { return $this->metadata[$offset]; } - function offsetSet($offset, $value) + function offsetSet($offset, $value): void { if ($offset === null) { if (isset($value[0])) { @@ -66,7 +66,7 @@ class OQLParser_yyToken implements ArrayAccess } } - function offsetUnset($offset) + function offsetUnset($offset): void { unset($this->metadata[$offset]); } diff --git a/datamodels/2.x/itop-portal-base/portal/src/Twig/AppVariable.php b/datamodels/2.x/itop-portal-base/portal/src/Twig/AppVariable.php index 9218162a8..316372f35 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Twig/AppVariable.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Twig/AppVariable.php @@ -56,20 +56,9 @@ class AppVariable implements ArrayAccess } /** - * Whether a offset exists - * @link https://php.net/manual/en/arrayaccess.offsetexists.php - * - * @param mixed $offset
- * An offset to check for. - *
- * - * @return boolean true on success or false on failure. - * - *- * The return value will be casted to boolean if non-boolean was returned. - * @since 5.0.0 + * @inheritDoc */ - public function offsetExists($offset) + public function offsetExists($offset): bool { if ($this->container->hasParameter($offset)) { return true; @@ -82,17 +71,9 @@ class AppVariable implements ArrayAccess } /** - * Offset to retrieve - * @link https://php.net/manual/en/arrayaccess.offsetget.php - * - * @param mixed $offset
- * The offset to retrieve. - *
- * - * @return mixed Can return all value types. - * @since 5.0.0 + * @inheritDoc */ - public function offsetGet($offset) + public function offsetGet($offset): mixed { if ($this->container->hasParameter($offset)) { return $this->container->getParameter($offset); @@ -105,20 +86,9 @@ class AppVariable implements ArrayAccess } /** - * Offset to set - * @link https://php.net/manual/en/arrayaccess.offsetset.php - * - * @param mixed $offset- * The offset to assign the value to. - *
- * @param mixed $value- * The value to set. - *
- * - * @return void - * @since 5.0.0 + * @inheritDoc */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if ($this->container->hasParameter($offset)) { @@ -141,17 +111,10 @@ class AppVariable implements ArrayAccess } /** - * Offset to unset - * @link https://php.net/manual/en/arrayaccess.offsetunset.php - * - * @param mixed $offset- * The offset to unset. - *
- * - * @return void - * @since 5.0.0 + * @inheritDoc */ - public function offsetUnset($offset){ + public function offsetUnset($offset): void + { if ($this->container->hasParameter($offset)) { $this->container->setParameter($offset, null); return;