Completed
Push — master ( e32eeb...714cda )
by
unknown
89:50 queued 46:29
created

FalseCondition::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %
Metric Value
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Oro\Component\ConfigExpression\Condition;
4
5
use Oro\Component\ConfigExpression\Exception;
6
7
/**
8
 * Implements logical FALSE constant.
9
 */
10 View Code Duplication
class FalseCondition extends AbstractCondition
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getName()
16
    {
17
        return 'false';
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function toArray()
24
    {
25
        return $this->convertToArray(null);
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function compile($factoryAccessor)
32
    {
33
        return $this->convertToPhpCode(null, $factoryAccessor);
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function initialize(array $options)
40
    {
41
        if (!empty($options)) {
42
            throw new Exception\InvalidArgumentException('Options are prohibited.');
43
        }
44
45
        return $this;
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    protected function isConditionAllowed($context)
52
    {
53
        return false;
54
    }
55
}
56