Passed
Push — main ( 92895e...7a79c8 )
by Breno
01:59
created

IteratorTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIterator() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace BrenoRoosevelt\Validation\DataStructure;
5
6
use ArrayIterator;
7
8
trait IteratorTrait
9
{
10
    use CollectionTrait;
11
12
    public function getIterator(): ArrayIterator
13
    {
14
        return new ArrayIterator($this->elements);
15
    }
16
}
17