Completed
Pull Request — 3.x (#935)
by Peter
01:56
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
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