Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoren committed Mar 10, 2024
1 parent bf4cd77 commit b1b8026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/Interfaces/ArrayViewInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Smoren\ArrayView\Interfaces;

use Smoren\ArrayView\Views\ArrayView;

/**
* @template T
* @extends \ArrayAccess<int, T|array<T>>
Expand Down
6 changes: 3 additions & 3 deletions src/Views/ArrayView.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function apply(callable $mapper): self
*
* {@inheritDoc}
*/
public function applyWith($data, callable $mapper): ArrayViewInterface
public function applyWith($data, callable $mapper): self
{
[$dataSize, $thisSize] = [\count($data), \count($this)];
if ($dataSize !== $thisSize) {
Expand All @@ -155,9 +155,9 @@ public function applyWith($data, callable $mapper): ArrayViewInterface
/**
* {@inheritDoc}
*
* @return ArrayViewInterface<T>
* @return ArrayView<T>
*/
public function set($newValues): ArrayViewInterface
public function set($newValues): self
{
if (!\is_array($newValues) && !($newValues instanceof ArrayViewInterface)) {
for ($i = 0; $i < \count($this); $i++) {
Expand Down

0 comments on commit b1b8026

Please sign in to comment.