Skip to content

Commit

Permalink
fix(HasOptions): Fix offsetGet method
Browse files Browse the repository at this point in the history
- Added missing implementation for offsetGet method in HasOptions trait
- Resolves issue with accessing options array
- Fix #85
  • Loading branch information
guanguans committed Jun 13, 2024
1 parent b05c8ef commit ea00174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Foundation/Concerns/HasOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function offsetExists($offset): bool
return isset($this->options[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->getOption($offset);
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ public function offsetExists($offset): bool
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->json()[$offset] ?? null;
Expand Down

0 comments on commit ea00174

Please sign in to comment.