Rand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 6 1
A getSql() 0 4 1
1
<?php
2
3
namespace Victoire\Bundle\QueryBundle\DoctrineFunctions;
4
5
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
6
use Doctrine\ORM\Query\Lexer;
7
use Doctrine\ORM\Query\SqlWalker;
8
9
/**
10
 * RandFunction ::= "RAND" "(" ")".
11
 */
12
class Rand extends FunctionNode
13
{
14
    public function parse(\Doctrine\ORM\Query\Parser $parser)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
15
    {
16
        $parser->match(Lexer::T_IDENTIFIER);
17
        $parser->match(Lexer::T_OPEN_PARENTHESIS);
18
        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
19
    }
20
21
    public function getSql(SqlWalker $sqlWalker)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
22
    {
23
        return 'RAND()';
24
    }
25
}
26