User::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models;
5
6
use TheCodingMachine\GraphQL\Controllers\Annotations\Field;
7
use TheCodingMachine\GraphQL\Controllers\Annotations\Type;
8
9
/**
10
 * @Type()
11
 */
12
class User extends Contact
13
{
14
    /**
15
     * @var string
16
     */
17
    private $email;
18
19
    public function __construct(string $name, string $email)
20
    {
21
        parent::__construct($name);
22
        $this->email = $email;
23
    }
24
25
    /**
26
     * @Field(name="email")
27
     * @return string
28
     */
29
    public function getEmail(): string
30
    {
31
        return $this->email;
32
    }
33
}
34