Rand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 14
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 6 1
A getSql() 0 4 1
1
<?php
2
3
namespace Luxifer\DQL\Numeric;
4
5
use Doctrine\ORM\Query\Lexer;
6
use Doctrine\ORM\Query\Parser;
7
use Doctrine\ORM\Query\SqlWalker;
8
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
9
10
class Rand extends FunctionNode
11
{
12 1
    public function parse(Parser $parser)
13
    {
14 1
        $parser->match(Lexer::T_IDENTIFIER);
15 1
        $parser->match(Lexer::T_OPEN_PARENTHESIS);
16 1
        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
17 1
    }
18
19 1
    public function getSql(SqlWalker $sqlWalker)
20
    {
21 1
        return 'RAND()';
22
    }
23
}
24