Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mirko-pagliai committed Jan 4, 2024
1 parent 082374c commit f1a7a98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"require": {
"php": ">=8.1",
"cakephp/cakephp": "^4.3",
"mirko-pagliai/php-tools": "^1.7.1",
"symfony/dom-crawler": "^5.1.4|^6.0|^7.0"
"mirko-pagliai/php-tools": "^1.8.2",
"symfony/dom-crawler": "^6.0|^7.0"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^4.0",
Expand Down
8 changes: 4 additions & 4 deletions src/ResultScan.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ResultScan extends Collection
* Internal method to parse items.
*
* Ensures that each item is a `ScanEntity` and has all the properties it needs
* @param \Cake\Collection\CollectionInterface|\Traversable|iterable $items Items
* @param \Cake\Collection\CollectionInterface|iterable $items Items
* @return array<\LinkScanner\ScanEntity> Parsed items
*/
protected function parseItems(iterable $items): array
Expand All @@ -43,9 +43,9 @@ protected function parseItems(iterable $items): array

/**
* Constructor
* @param \Cake\Collection\CollectionInterface|\Traversable|iterable $items Items
* @param \Cake\Collection\CollectionInterface|iterable $items Items
*/
public function __construct($items = [])
public function __construct(CollectionInterface|iterable $items = [])
{
parent::__construct($this->parseItems($items));
}
Expand All @@ -69,7 +69,7 @@ public function append($items): CollectionInterface
* @param mixed $items Items
* @return \Cake\Collection\CollectionInterface
*/
public function prepend($items): CollectionInterface
public function prepend(mixed $items): CollectionInterface
{
return new ResultScan(array_merge($this->parseItems($items), $this->buffered()->toArray()));
}
Expand Down

0 comments on commit f1a7a98

Please sign in to comment.