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

HandlerContext   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 55
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A annotations() 0 4 1
A body() 0 4 1
A printer() 0 4 1
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