Queue::next()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 0
Metric Value
cc 2
eloc 4
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 4
cts 5
cp 0.8
crap 2.032
rs 10
1
<?php
2
3
namespace Bavix\Lexer;
4
5
class Queue extends \Bavix\Foundation\Arrays\Queue
6
{
7
8
    /**
9
     * @return mixed|null
10
     */
11 24
    public function next()
12
    {
13 24
        $self = clone $this;
14
15 24
        return $self->isEmpty() ?
16
            null :
17 24
            $self->pop();
18
    }
19
20
}
21