Passed
Push — master ( bc6688...f0a8fd )
by Dāvis
03:26
created

NotSpecification::isSatisfiedBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Sludio\HelperBundle\Script\Specification;
4
5
/**
6
 * Not specification
7
 */
8
class NotSpecification extends CompositeSpecification
9
{
10
    /**
11
     * @var SpecificationInterface
12
     */
13
    private $specification;
14
15
    /**
16
     * Constructor
17
     *
18
     * @param SpecificationInterface $specification
19
     */
20
    public function __construct(SpecificationInterface $specification)
21
    {
22
        $this->specification = $specification;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function isSatisfiedBy($object)
29
    {
30
        return !$this->specification->isSatisfiedBy($object);
31
    }
32
}