PackageDependency   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 55
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A setName() 0 5 1
A getVersion() 0 4 1
A setVersion() 0 5 1
1
<?php
2
/**
3
 * This file is part of the wow-apps/symfony-packagist project
4
 * https://github.com/wow-apps/symfony-packagist
5
 *
6
 * (c) 2017 WoW-Apps
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WowApps\PackagistBundle\DTO;
13
14
/**
15
 * Class PackageDependencies
16
 *
17
 * @author Alexey Samara <[email protected]>
18
 * @package wow-apps/symfony-packagist
19
 */
20
class PackageDependency
21
{
22
    /** @var string */
23
    private $name;
24
25
    /** @var string */
26
    private $version;
27
28
    /**
29
     * PackageDependency constructor.
30
     *
31
     * @param string $name
32
     * @param string $version
33
     */
34
    public function __construct(string $name = '', string $version = '')
35
    {
36
        $this->setName($name)->setVersion($version);
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getName(): string
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * @param string $name
49
     * @return PackageDependency
50
     */
51
    public function setName(string $name): PackageDependency
52
    {
53
        $this->name = $name;
54
        return $this;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getVersion(): string
61
    {
62
        return $this->version;
63
    }
64
65
    /**
66
     * @param string $version
67
     * @return PackageDependency
68
     */
69
    public function setVersion(string $version): PackageDependency
70
    {
71
        $this->version = $version;
72
        return $this;
73
    }
74
}
75