Skip to content

Commit e5f0e7a

Browse files
authored
Update DataObj.php
1 parent ea4f516 commit e5f0e7a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/DataObj.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class DataObj implements Arrayable, \Stringable, \ArrayAccess, \IteratorAg
1313
private array $data = [];
1414
public function __construct(object|iterable $data = [])
1515
{
16-
if (!is_iterable($data)) $this->data = get_object_vars($data);
16+
if (!is_iterable($data)) $this->data = \get_object_vars($data);
1717
elseif (is_array($data)) $this->data = $data;
1818
else foreach ($data as $k => $value) $this->data[$k] = $value;
1919
}
@@ -115,7 +115,7 @@ public function toArray(): array
115115
*/
116116
public function toJson(int $options = 0): string
117117
{
118-
return json_encode($this->data, $options|JSON_THROW_ON_ERROR);
118+
return \json_encode($this->data, $options|JSON_THROW_ON_ERROR);
119119
}
120120

121121
/**
@@ -128,7 +128,7 @@ public function getIterator(): \Generator
128128

129129
public function offsetExists(mixed $offset): bool
130130
{
131-
return array_key_exists($offset, $this->data);
131+
return \array_key_exists($offset, $this->data);
132132
}
133133

134134
public function offsetGet(mixed $offset): mixed

0 commit comments

Comments
 (0)