View::setSerializerEnableMaxDepthChecks()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the FOSRestBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\RestBundle\Controller\Annotations;
13
14
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
15
16
/**
17
 * View annotation class.
18
 *
19
 * @Annotation
20
 * @Target({"METHOD","CLASS"})
21
 */
22
class View extends Template
23
{
24
    /**
25
     * @var int
26
     */
27
    protected $statusCode;
28
29
    /**
30
     * @var array
31
     */
32
    protected $serializerGroups;
33
34
    /**
35
     * @var bool
36
     */
37
    protected $serializerEnableMaxDepthChecks;
38
39
    /**
40
     * @param int $statusCode
41
     */
42 3
    public function setStatusCode($statusCode)
43
    {
44 3
        $this->statusCode = $statusCode;
45 3
    }
46
47
    /**
48
     * @return int
49
     */
50 13
    public function getStatusCode()
51
    {
52 13
        return $this->statusCode;
53
    }
54
55
    /**
56
     * @param array $serializerGroups
57
     */
58
    public function setSerializerGroups($serializerGroups)
59
    {
60
        $this->serializerGroups = $serializerGroups;
61
    }
62
63
    /**
64
     * @return array
65
     */
66 13
    public function getSerializerGroups()
67
    {
68 13
        return $this->serializerGroups;
69
    }
70
71
    /**
72
     * @param bool $serializerEnableMaxDepthChecks
73
     */
74 2
    public function setSerializerEnableMaxDepthChecks($serializerEnableMaxDepthChecks)
75
    {
76 2
        $this->serializerEnableMaxDepthChecks = $serializerEnableMaxDepthChecks;
77 2
    }
78
79
    /**
80
     * @return bool
81
     */
82 13
    public function getSerializerEnableMaxDepthChecks()
83
    {
84 13
        return $this->serializerEnableMaxDepthChecks;
85
    }
86
}
87