Skip to content

Commit

Permalink
Merge pull request #80 from ndeet/v2-preparation
Browse files Browse the repository at this point in the history
V2 preparation
  • Loading branch information
ndeet authored Oct 27, 2022
2 parents 4553595 + 2d09636 commit f474251
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Result/AbstractResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ public function getData(): array
return $this->data;
}

public function offsetExists($offset)
public function offsetExists($offset): bool
{
$data = $this->getData();
return array_key_exists($offset, $data);
}

public function offsetGet($offset)
public function offsetGet($offset): mixed
{
$data = $this->getData();
return $data[$offset] ?? null;
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
throw new \RuntimeException('You should not change the data in a result.');
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
throw new \RuntimeException('You should not change the data in a result.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Result/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function isNew(): bool
return $data['status'] === self::STATUS_NEW;
}

public function isFullyPaid(): bool
public function isSettled(): bool
{
$data = $this->getData();
return $data['status'] === self::STATUS_SETTLED;
Expand Down

0 comments on commit f474251

Please sign in to comment.