Completed
Push — master ( 608de6...159902 )
by Richard
05:43
created

Everything   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 0 Features 1
Metric Value
c 4
b 0
f 1
dl 0
loc 11
wmc 2
lcom 0
cbo 2
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compile() 0 6 2
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 * 
5
 * Copyright (c) 2016 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received 
8
 * a copy of the licence along with the code.
9
 */
10
11
namespace Lechimp\Dicto\Variables;
12
13
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
14
15
class Everything extends Variable {
16
    /**
17
     * @inheritdocs
18
     */
19 23
    public function compile(ExpressionBuilder $builder, $table_name, $negate = false) {
20 23
        return $builder->eq 
21 23
            ( $builder->literal($negate ? 0 : 1)
22 23
            , $builder->literal(1)
23 23
            );
24
    }
25
}
26
27