2019-12-24 01:52:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Psl\Tests\Collection;
|
|
|
|
|
2020-02-21 02:03:40 +01:00
|
|
|
use Psl\Collection\Vector;
|
2019-12-24 01:52:07 +01:00
|
|
|
|
2020-02-21 02:03:40 +01:00
|
|
|
final class VectorTest extends AbstractVectorTest
|
2019-12-24 01:52:07 +01:00
|
|
|
{
|
2020-02-21 02:03:40 +01:00
|
|
|
/**
|
|
|
|
* The Vector class used for values, keys .. etc.
|
|
|
|
*
|
|
|
|
* @psalm-var class-string<Vector>
|
|
|
|
*/
|
|
|
|
protected string $vectorClass = Vector::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @template T
|
|
|
|
*
|
|
|
|
* @psalm-param iterable<T> $items
|
|
|
|
*
|
|
|
|
* @psalm-return Vector<T>
|
|
|
|
*/
|
|
|
|
protected function create(iterable $items): Vector
|
|
|
|
{
|
|
|
|
return new Vector($items);
|
2019-12-24 01:52:07 +01:00
|
|
|
}
|
|
|
|
}
|