diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c03a68c..2ca1113 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.0, 8.1] + php: [8.0, 8.1, 8.2] os: [ubuntu-latest, macOS-latest] # windows-latest, # include: # will not testing on php 7.2 # - os: 'ubuntu-latest' @@ -54,4 +54,4 @@ jobs: # Docs: https://getcomposer.org/doc/articles/scripts.md - name: Run test suite - run: phpunit -v --debug + run: phpunit diff --git a/src/Collection.php b/src/Collection.php index dbb36cd..3257f70 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -122,11 +122,11 @@ public function setKeyPathSep(string $keyPathSep): void } /** - * @param array|Traversable $data + * @param iterable $data * * @return $this */ - public function load(array|Traversable $data): self + public function load(iterable $data): self { $this->bindData($this->data, $data); @@ -134,11 +134,11 @@ public function load(array|Traversable $data): self } /** - * @param array|Traversable $data + * @param iterable $data * * @return $this */ - public function loadData(array|Traversable $data): self + public function loadData(iterable $data): self { $this->bindData($this->data, $data); @@ -147,10 +147,10 @@ public function loadData(array|Traversable $data): self /** * @param array $parent - * @param array|Traversable $data + * @param iterable $data * @param int $depth */ - protected function bindData(array &$parent, array|Traversable $data, int $depth = 1): void + protected function bindData(array &$parent, iterable $data, int $depth = 1): void { foreach ($data as $key => $value) { if ($value === null) {