From b1b8026066694dde444131176c8a1ca0754dff35 Mon Sep 17 00:00:00 2001 From: Smoren Date: Sun, 10 Mar 2024 20:39:12 +0300 Subject: [PATCH] type fixes --- src/Interfaces/ArrayViewInterface.php | 2 -- src/Views/ArrayView.php | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Interfaces/ArrayViewInterface.php b/src/Interfaces/ArrayViewInterface.php index 1ec3598..636c0c9 100644 --- a/src/Interfaces/ArrayViewInterface.php +++ b/src/Interfaces/ArrayViewInterface.php @@ -4,8 +4,6 @@ namespace Smoren\ArrayView\Interfaces; -use Smoren\ArrayView\Views\ArrayView; - /** * @template T * @extends \ArrayAccess> diff --git a/src/Views/ArrayView.php b/src/Views/ArrayView.php index e84dc3f..15f327a 100644 --- a/src/Views/ArrayView.php +++ b/src/Views/ArrayView.php @@ -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) { @@ -155,9 +155,9 @@ public function applyWith($data, callable $mapper): ArrayViewInterface /** * {@inheritDoc} * - * @return ArrayViewInterface + * @return ArrayView */ - public function set($newValues): ArrayViewInterface + public function set($newValues): self { if (!\is_array($newValues) && !($newValues instanceof ArrayViewInterface)) { for ($i = 0; $i < \count($this); $i++) {