Completed
Push — master ( 2ac042...4e5e3b )
by Nate
02:40
created

HandlerContext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
/*
3
 * Copyright (c) 2015 Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
7
namespace Tebru\Retrofit\Generation;
8
9
use Tebru\Dynamo\Model\Body;
10
use Tebru\Retrofit\Generation\Printer\ArrayPrinter;
11
use Tebru\Retrofit\Generation\Provider\AnnotationProvider;
12
13
/**
14
 * Class HandlerContext
15
 *
16
 * @author Nate Brunette <[email protected]>
17
 */
18
class HandlerContext
19
{
20
    /**
21
     * @var AnnotationProvider
22
     */
23
    private $annotationProvider;
24
25
    /**
26
     * @var Body
27
     */
28
    private $methodBody;
29
30
    /**
31
     * @var ArrayPrinter
32
     */
33
    private $printer;
34
35
    /**
36
     * Constructor
37
     *
38
     * @param AnnotationProvider $annotationProvider
39
     * @param Body $methodBody
40
     * @param ArrayPrinter $printer
41
     */
42
    public function __construct(AnnotationProvider $annotationProvider, Body $methodBody, ArrayPrinter $printer)
43
    {
44
        $this->annotationProvider = $annotationProvider;
45
        $this->methodBody = $methodBody;
46
        $this->printer = $printer;
47
    }
48
49
    /**
50
     * @return AnnotationProvider
51
     */
52
    public function annotations()
53
    {
54
        return $this->annotationProvider;
55
    }
56
57
    /**
58
     * @return Body
59
     */
60
    public function body()
61
    {
62
        return $this->methodBody;
63
    }
64
65
    /**
66
     * @return ArrayPrinter
67
     */
68
    public function printer()
69
    {
70
        return $this->printer;
71
    }
72
}
73