Skip to content

Commit

Permalink
Add type declarations for PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Aug 10, 2022
1 parent 0942776 commit f90b103
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions includes/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 );
}

Expand All @@ -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 );
}

Expand All @@ -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 );
}

Expand All @@ -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 );
}

Expand Down

0 comments on commit f90b103

Please sign in to comment.