for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace BrenoRoosevelt\Validation\DataStructure;
trait MapBehaviorTrait
{
use CollectionTrait;
public function __construct(iterable $elements = [])
foreach ($elements as $index => $element) {
$this->set($index, $element);
}
public function set(string|int $index, $value): self
$this->insert($value, $index);
return $this;