Iterator   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 7
dl 0
loc 33
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A rewind() 0 3 1
A key() 0 3 1
A current() 0 3 1
A next() 0 3 1
A valid() 0 3 1
1
<?php namespace Mbh\Collection\Traits\Sequenceable\Arrayed;
2
3
/**
4
 * MBHFramework
5
 *
6
 * @link      https://github.com/MBHFramework/mbh-framework
7
 * @copyright Copyright (c) 2017 Ulises Jeremias Cornejo Fandos
8
 * @license   https://github.com/MBHFramework/mbh-framework/blob/master/LICENSE (MIT License)
9
 */
10
11
use Traversable;
12
13
trait Iterator
14
{
15
    protected $sfa = null;
16
17
    /**
18
     * Iterator
19
     */
20
    public function current()
21
    {
22
        return $this->sfa->current();
23
    }
24
25
    public function key(): int
26
    {
27
        return $this->sfa->key();
28
    }
29
30
    public function next()
31
    {
32
        return $this->sfa->next();
33
    }
34
35
    public function rewind()
36
    {
37
        return $this->sfa->rewind();
38
    }
39
40
    public function valid()
41
    {
42
        return $this->sfa->valid();
43
    }
44
45
    abstract protected function checkCapacity();
46
}
47