Skip to content

Commit

Permalink
Simplified Result's toArray()
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinOrlowski committed Oct 20, 2023
1 parent a1438de commit b4a25c5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,6 @@ public function toArray(): array
$data = $this->getData();
if ($data instanceof ArrayableContract) {
$data = $data->toArray();
} else if ($data instanceof \Stringable) {
$data = $data->__toString();
} else if ($data instanceof \ArrayObject) {
$data = $data->getArrayCopy();
} else if (is_object($data)) {
$cls = \get_class($data);
$data = "<{$cls}>";
}

$result['data'] = $data;
Expand Down

0 comments on commit b4a25c5

Please sign in to comment.