Skip to content

Commit

Permalink
improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Aug 26, 2024
1 parent f3cfb31 commit 73a04c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/PropertyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ public function validate()
| dump & dd
|--------------------------------------------------------------------------
*/
/** @codeCoverageIgnore */
public function dump(): self
{
dump($this->items);

return $this;
}

/** @codeCoverageIgnore */
public function dd(): never
{
dd($this->items);
Expand All @@ -104,16 +106,19 @@ public function dd(): never
| ArrayAccess/Iterator methods
|--------------------------------------------------------------------------
*/
/** @codeCoverageIgnore */
public function offsetExists($offset): bool
{
return isset($this->items[$offset]);
}

/** @codeCoverageIgnore */
public function offsetGet($offset): mixed
{
return $this->items[$offset];
}

/** @codeCoverageIgnore */
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
Expand All @@ -125,6 +130,7 @@ public function offsetSet($offset, $value): void
$this->items[$offset] = $value;
}

/** @codeCoverageIgnore */
public function offsetUnset($offset): void
{
unset($this->items[$offset]);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ function group(Component $component, string|array $groups): PropertyCollection
}
}

return new PropertyCollection($component, $result);
return PropertyCollection::make($component, $result);
}

0 comments on commit 73a04c9

Please sign in to comment.