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

Product::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Sonata\DoctrineORMAdminBundle\Tests\Fixtures\Entity;
5
6
class Product
7
{
8
    /**
9
     * @var ProductId
10
     */
11
    private $id;
12
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * @param ProductId $id
20
     * @param string    $name
21
     */
22
    public function __construct(ProductId $id, string $name)
23
    {
24
        $this->id = $id;
25
        $this->name = $name;
26
    }
27
28
    /**
29
     * @return ProductId
30
     */
31
    public function getId(): ProductId
32
    {
33
        return $this->id;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getName(): string
40
    {
41
        return $this->name;
42
    }
43
}
44