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

User::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Zenstruck\Foundry\Tests\Fixtures\Document;
4
5
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
6
7
/**
8
 * @MongoDB\EmbeddedDocument
9
 */
10
class User
11
{
12
    /**
13
     * @MongoDB\Field(type="string")
14
     */
15
    private $name;
16
17
    public function __construct(string $name)
18
    {
19
        $this->name = $name;
20
    }
21
22
    public function getName(): ?string
23
    {
24
        return $this->name;
25
    }
26
}
27