Completed
Push — master ( a92ee2...268555 )
by Dmitry
04:05
created

IteratorMethods::getIterator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PHPKitchen\Platform\Struct\Mixin;
4
5
use ArrayIterator;
6
7
/**
8
 * Represents implementation of  iterator interface for collections.
9
 *
10
 * @property array $elements data storage.
11
 *
12
 * @author Dmitry Kolodko <[email protected]>
13
 * @since 1.0
14
 */
15
trait IteratorMethods {
16
    /**
17
     * Get an iterator for the items.
18
     *
19
     * @return \ArrayIterator
20
     * 
21
     * @since 1.0
22
     */
23
    public function getIterator() {
24
        return new ArrayIterator($this->elements);
25
    }
26
}