Code Duplication    Length = 18-18 lines in 2 locations

Constraint/NotSame.php 1 location

@@ 18-35 (lines=18) @@
15
 *
16
 * @author Karel Osorio Ramírez <[email protected]>
17
 */
18
class NotSame extends BinaryConstraintOperator
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function evaluate($value)
24
    {
25
        return $this->left()->apply($value) !== $this->right()->apply($value);
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function not()
32
    {
33
        return new Same($this->left(), $this->right());
34
    }
35
}
36

Constraint/Same.php 1 location

@@ 18-35 (lines=18) @@
15
 *
16
 * @author Karel Osorio Ramírez <[email protected]>
17
 */
18
class Same extends BinaryConstraintOperator
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function evaluate($value)
24
    {
25
        return $this->left()->apply($value) === $this->right()->apply($value);
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function not()
32
    {
33
        return new NotSame($this->left(), $this->right());
34
    }
35
}
36