Rand::getSql()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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