Completed
Pull Request — 3.x (#935)
by Peter
01:49
created

Product   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A getName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
/*
5
 * This file is part of the Sonata Project package.
6
 *
7
 * (c) Thomas Rabaix <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Sonata\DoctrineORMAdminBundle\Tests\Fixtures\Entity;
14
15
class Product
16
{
17
    /**
18
     * @var ProductId
19
     */
20
    private $id;
21
22
    /**
23
     * @var string
24
     */
25
    private $name;
26
27
    /**
28
     * @param ProductId $id
29
     * @param string    $name
30
     */
31
    public function __construct(ProductId $id, string $name)
32
    {
33
        $this->id = $id;
34
        $this->name = $name;
35
    }
36
37
    /**
38
     * @return ProductId
39
     */
40
    public function getId(): ProductId
41
    {
42
        return $this->id;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getName(): string
49
    {
50
        return $this->name;
51
    }
52
}
53