diff --git a/src/SecurityScheme/SecuritySettings/DefaultSecuritySettings.php b/src/SecurityScheme/SecuritySettings/DefaultSecuritySettings.php index 6d1bcf7c..a085ccf0 100644 --- a/src/SecurityScheme/SecuritySettings/DefaultSecuritySettings.php +++ b/src/SecurityScheme/SecuritySettings/DefaultSecuritySettings.php @@ -70,7 +70,7 @@ public function offsetSet($offset, $value): void * * @return bool */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->settings[$offset]); } @@ -88,7 +88,7 @@ public function offsetUnset($offset): void * Get a single settings value * @link http://php.net/manual/en/arrayaccess.offsetget.php */ - public function offsetGet($offset) + public function offsetGet($offset): mixed { return $this->settings[$offset] ?? null; } diff --git a/src/TraitCollection.php b/src/TraitCollection.php index d59d159a..a83b6a5d 100644 --- a/src/TraitCollection.php +++ b/src/TraitCollection.php @@ -55,10 +55,7 @@ public static function getInstance() return self::$instance; } - /** - * @return TraitDefinition - */ - public function current() + public function current(): TraitDefinition { if ($this->valid()) { return $this->collection[$this->position]; @@ -67,10 +64,7 @@ public function current() throw new InvalidKeyException($this->position); } - /** - * @return int - */ - public function key() + public function key(): int { return $this->position; } @@ -85,10 +79,7 @@ public function rewind(): void $this->position = 0; } - /** - * @return bool - */ - public function valid() + public function valid(): bool { return isset($this->collection[$this->position]); } diff --git a/src/TypeCollection.php b/src/TypeCollection.php index 344495da..88b25886 100644 --- a/src/TypeCollection.php +++ b/src/TypeCollection.php @@ -52,7 +52,7 @@ public static function getInstance() /** * {@inheritDoc} */ - public function current() + public function current(): mixed { return $this->collection[$this->position]; } @@ -60,7 +60,7 @@ public function current() /** * {@inheritDoc} */ - public function key() + public function key(): mixed { return $this->position; } @@ -84,7 +84,7 @@ public function rewind(): void /** * {@inheritDoc} */ - public function valid() + public function valid(): bool { return isset($this->collection[$this->position]); }