Passed
Pull Request — master (#153)
by Kevin
03:35
created

Category::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Zenstruck\Foundry\Tests\Fixtures\Document;
4
5
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
6
7
/**
8
 * @MongoDB\Document(collection="category")
9
 */
10
class Category
11
{
12
    /**
13
     * @MongoDB\Id
14
     */
15
    private $id;
16
17
    /**
18
     * @MongoDB\Field(type="string")
19
     */
20
    private $name;
21
22
    public function __toString(): string
23
    {
24
        return $this->name;
25
    }
26
27
    public function getId()
28
    {
29
        return $this->id;
30
    }
31
32
    public function getName(): ?string
33
    {
34
        return $this->name;
35
    }
36
37
    public function setName($name): void
38
    {
39
        $this->name = $name;
40
    }
41
}
42