From f90b10347c7106d09e1e80e13eb30929f83aa85c Mon Sep 17 00:00:00 2001 From: Micah Wood Date: Wed, 10 Aug 2022 16:37:53 -0400 Subject: [PATCH] Add type declarations for PHP 8.0 --- includes/Container.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/Container.php b/includes/Container.php index 7c5e11b..b5bdcb0 100644 --- a/includes/Container.php +++ b/includes/Container.php @@ -156,8 +156,8 @@ public function get( string $id ) { /** * Set an array value by ID. * - * @param string $id The entry identifier. - * @param mixed $value The entry value. + * @param string $id The entry identifier. + * @param mixed $value The entry value. * * @return $this */ @@ -219,7 +219,7 @@ public function deleteAllInstances() { /** * Extend a factory or service by creating a closure that will manipulate the instantiated instance. * - * @param string $id + * @param string $id * @param Closure $closure * * @return Closure @@ -415,7 +415,7 @@ public function rewind(): void { * * @return bool True on success or false on failure. */ - public function offsetExists( mixed $offset ) { + public function offsetExists( mixed $offset ): mixed { return $this->has( $offset ); } @@ -430,7 +430,7 @@ public function offsetExists( mixed $offset ) { * * @throws NotFoundException No entry was found for **this** identifier. */ - public function offsetGet( mixed $offset ) { + public function offsetGet( mixed $offset ): mixed { return $this->get( $offset ); } @@ -440,11 +440,11 @@ public function offsetGet( mixed $offset ) { * Method implements ArrayAccess. * * @param mixed $offset The offset to assign the value to. - * @param mixed $value The value to set. + * @param mixed $value The value to set. * * @return void */ - public function offsetSet( mixed $offset, mixed $value ) { + public function offsetSet( mixed $offset, mixed $value ): void { $this->set( $offset, $value ); } @@ -459,7 +459,7 @@ public function offsetSet( mixed $offset, mixed $value ) { * * @throws NotFoundException */ - public function offsetUnset( mixed $offset ) { + public function offsetUnset( mixed $offset ): void { $this->delete( $offset ); }