Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
ActionHashmap
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
2.50
0.00% covered (danger)
0.00%
0 / 1
 offsetGet
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 merge
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Common\RouteDefinitions;
3
4use Apie\Common\Interfaces\HasRouteDefinition;
5use Apie\Core\Lists\ItemHashmap;
6
7final class ActionHashmap extends ItemHashmap
8{
9    public function offsetGet(mixed $offset): HasRouteDefinition
10    {
11        return parent::offsetGet($offset);
12    }
13
14    /**
15     * @TODO: merge actions with same route definition....
16     */
17    public function merge(self $hashmap): self
18    {
19        return new self($this->internalArray + $hashmap->internalArray);
20    }
21}