Completed
Push — master ( 1e9ef5...3740bc )
by Richard
05:53 queued 29s
created

_False::compile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 0
crap 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 license along with the code.
9
 */
10
11
namespace Lechimp\Dicto\Graph\Predicate;
12
13
use Lechimp\Dicto\Graph\Predicate;
14
use Lechimp\Dicto\Graph\Entity;
15
16
/**
17
 * A predicate that is always true.
18
 */
19
class _False extends Predicate {
20
    /**
21
     * @inheritdocs
22
     */
23
    public function compile() {
24
        return function(Entity $e) { return false; };
0 ignored issues
show
Unused Code introduced by
The parameter $e is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    }
26
27
    /**
28
     * @inheritdocs
29
     */
30 3
    public function for_types($existing_types) {
31 3
        return [];
32
    }
33
}
34