Passed
Push — master ( 229462...d74785 )
by Andreas
02:20 queued 14s
created

Version::equals()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 1
c 0
b 0
f 0
nc 2
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Version;
6
7
final class Version
8
{
9
    /** @var string */
10
    private $version;
11
12 134
    public function __construct(string $version)
13
    {
14 134
        $this->version = $version;
15 134
    }
16
17 83
    public function __toString() : string
18
    {
19 83
        return $this->version;
20
    }
21
22
    /**
23
     * @param mixed $object
24
     */
25 52
    public function equals($object) : bool
26
    {
27 52
        return $object instanceof self && $object->version === $this->version;
28
    }
29
}
30