AttendeeRequest::getEmail()   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
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Requests;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Realshadow\RequestDeserializer\Contracts\RequestInterface;
7
8
9
class AttendeeRequest implements RequestInterface
10
{
11
12
    /**
13
     * @var string $email
14
     *
15
     * @JMS\Since("1.x")
16
     * @JMS\Type("string")
17
     * @JMS\SerializedName("email")
18
     */
19
    private $email;
20
21
    /**
22
     * @var int $perPage
23
     *
24
     * @JMS\Since("1.x")
25
     * @JMS\Type("boolean")
26
     * @JMS\SerializedName("required")
27
     */
28
    private $required;
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public static function shouldValidate()
34
    {
35
        return true;
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41
    public static function getVersionConstraint()
42
    {
43
        return '1.0';
44
    }
45
46
    /**
47
     * @inheritdoc
48
     */
49
    public function getSchema()
50
    {
51
        return resource_path('schemas/attendee.json');
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getEmail()
58
    {
59
        return $this->email;
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getRequired()
66
    {
67
        return $this->required;
68
    }
69
70
}
71