Skip to content

Commit

Permalink
Fixed PHP IteratorAggregate, ArrayAccess and Countable-related deprec…
Browse files Browse the repository at this point in the history
…ation notices

- Ping #164

(cherry picked from commit 37ed4ab36bb6e43f71010245850b8940c21682f6)
  • Loading branch information
fulopattila122 committed Nov 17, 2023
1 parent 5a94473 commit 0917441
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions CheckoutManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,22 @@ public function dimension(): ?Dimension
return $this->store->dimension();
}

public function offsetExists(mixed $offset)
public function offsetExists(mixed $offset): bool
{
return $this->store->offsetExists($offset);
}

public function offsetGet(mixed $offset)
public function offsetGet(mixed $offset): mixed
{
return $this->store->offsetGet($offset);
}

public function offsetSet(mixed $offset, mixed $value)
public function offsetSet(mixed $offset, mixed $value): void
{
$this->store->offsetSet($offset, $value);
}

public function offsetUnset(mixed $offset)
public function offsetUnset(mixed $offset): void
{
$this->store->offsetUnset($offset);
}
Expand Down
4 changes: 2 additions & 2 deletions Drivers/BaseCheckoutStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function dimension(): ?Dimension
return null;
}

public function offsetSet(mixed $offset, mixed $value)
public function offsetSet(mixed $offset, mixed $value): void
{
if ($this->isRegularAttribute($offset)) {
$this->setAttribute($offset, $value);
Expand All @@ -197,7 +197,7 @@ public function offsetSet(mixed $offset, mixed $value)
}
}

public function offsetGet(mixed $offset)
public function offsetGet(mixed $offset): mixed
{
if ($this->isRegularAttribute($offset)) {
return $this->getAttribute($offset);
Expand Down
4 changes: 2 additions & 2 deletions Drivers/RequestStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public function clear(): void
$this->request->replace([]);
}

public function offsetExists(mixed $offset)
public function offsetExists(mixed $offset): bool
{
return $this->request->has($offset);
}

public function offsetUnset(mixed $offset)
public function offsetUnset(mixed $offset): void
{
$this->request->offsetUnset($offset);
}
Expand Down
4 changes: 2 additions & 2 deletions Drivers/SessionStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function getCustomAttributes(): array
return $this->readRawDataFromStore(static::CUSTOM_ATTRIBUTES_KEY) ?? [];
}

public function offsetExists(mixed $offset)
public function offsetExists(mixed $offset): bool
{
if ($this->isAnAliasAttribute($offset)) {
$offset = $this->getTargetOfAlias($offset);
Expand All @@ -122,7 +122,7 @@ public function offsetExists(mixed $offset)
return in_array($offset, array_merge($this->attributesPlain, $this->attributesViaGetterSetter));
}

public function offsetUnset(mixed $offset)
public function offsetUnset(mixed $offset): void
{
$this->session->forget($offset);
}
Expand Down

0 comments on commit 0917441

Please sign in to comment.