-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from laminas/3.6.x-merge-up-into-3.7.x_bybmh3M6
Merge release 3.6.3 into 3.7.x
- Loading branch information
Showing
6 changed files
with
185 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaminasTest\Stdlib\TestAsset; | ||
|
||
use Iterator; | ||
use ReturnTypeWillChange; | ||
|
||
use function current; | ||
use function key; | ||
use function next; | ||
use function reset; | ||
|
||
class IteratorWithToArrayMethod implements Iterator | ||
{ | ||
/** @var array */ | ||
private $elements = []; | ||
|
||
public function __construct(array $elements) | ||
{ | ||
$this->elements = $elements; | ||
} | ||
|
||
/** @return void */ | ||
#[ReturnTypeWillChange] | ||
public function rewind() | ||
{ | ||
reset($this->elements); | ||
} | ||
|
||
/** @return mixed */ | ||
#[ReturnTypeWillChange] | ||
public function current() | ||
{ | ||
return current($this->elements); | ||
} | ||
|
||
/** @return int|string */ | ||
#[ReturnTypeWillChange] | ||
public function key() | ||
{ | ||
return key($this->elements); | ||
} | ||
|
||
/** @return mixed */ | ||
#[ReturnTypeWillChange] | ||
public function next() | ||
{ | ||
return next($this->elements); | ||
} | ||
|
||
/** @return bool */ | ||
#[ReturnTypeWillChange] | ||
public function valid() | ||
{ | ||
$key = key($this->elements); | ||
return $key !== null && $key !== false; | ||
} | ||
|
||
public function toArray(): array | ||
{ | ||
return [ | ||
'data from to array' => 'not good', | ||
]; | ||
} | ||
} |
Empty file.