Passed
Push — master ( 80b57f...2460a5 )
by Yo
02:49
created

Package::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
namespace Yoanm\ComposerConfigManager\Domain\Model;
3
4
class Package
5
{
6
    /** @var string */
7
    private $name;
8
    /** @var string */
9
    private $versionConstraint;
10
    /**
11
     * @param string $name
12
     * @param string $versionConstraint
13
     */
14 4
    public function __construct($name, $versionConstraint)
15
    {
16 4
        $this->name = $name;
17 4
        $this->versionConstraint = $versionConstraint;
18 4
    }
19
20
    /**
21
     * @return string
22
     */
23 4
    public function getName()
24
    {
25 4
        return $this->name;
26
    }
27
28
    /**
29
     * @return string
30
     */
31 4
    public function getVersionConstraint()
32
    {
33 4
        return $this->versionConstraint;
34
    }
35
}
36