Builder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 36
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace ArinaSystems\JsonResponse\Builders;
4
5
use ArinaSystems\JsonResponse\Attribute;
6
use ArinaSystems\JsonResponse\Option;
7
use Illuminate\Container\Container;
8
9
abstract class Builder
10
{
11
    /**
12
     * @var \Illuminate\Http\Request
13
     */
14
    protected $request;
15
16
    /**
17
     * @var \ArinaSystems\JsonResponse\Option
18
     */
19
    protected $options;
20
21
    /**
22
     * @var \ArinaSystems\JsonResponse\Attribute
23
     */
24
    protected $attributes;
25
26
    /**
27
     * Create a new instance.
28
     *
29
     * @param  \ArinaSystems\JsonResponse\Option  $options
30
     * @param  \ArinaSystems\JsonResponse\Attribute  $attributes
31
     */
32
    public function __construct(Option $options, Attribute $attributes)
33
    {
34
        $this->options = $options;
35
        $this->attributes = $attributes;
36
        $this->request = Container::getInstance()->make('request');
37
    }
38
39
    /**
40
     * Build a value of the attribute.
41
     *
42
     * @return mixed
43
     */
44
    abstract public function build($value);
45
}
46