Passed
Pull Request — master (#5)
by Samuel
02:12
created

Source   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 66
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setPointer() 0 5 1
A getParameter() 0 3 1
A getPointer() 0 3 1
A setParameter() 0 5 1
1
<?php
2
3
namespace SMartins\Exceptions\JsonApi;
4
5
use Illuminate\Contracts\Support\Arrayable;
6
use SMartins\Exceptions\Traits\NotNullArrayable;
7
8
class Source implements Arrayable
9
{
10
    use NotNullArrayable;
11
12
    /**
13
     * A JSON Pointer [RFC6901] to the associated entity in the request document
14
     * [e.g. "/data" for a primary data object, or "/data/attributes/title" for
15
     * a specific attribute].
16
     *
17
     * @var string
18
     */
19
    protected $pointer;
20
21
    /**
22
     * A string indicating which URI query parameter caused the error.
23
     *
24
     * @var string
25
     */
26
    protected $parameter;
27
28
    /**
29
     * Get pointer.
30
     *
31
     * @return  string
32
     */
33
    public function getPointer()
34
    {
35
        return $this->pointer;
36
    }
37
38
    /**
39
     * Set pointer.
40
     *
41
     * @param  string  $pointer
42
     *
43
     * @return  self
44
     */
45
    public function setPointer(string $pointer)
46
    {
47
        $this->pointer = $pointer;
48
49
        return $this;
50
    }
51
52
    /**
53
     * Get parameter.
54
     *
55
     * @return  string
56
     */
57
    public function getParameter()
58
    {
59
        return $this->parameter;
60
    }
61
62
    /**
63
     * Set parameter.
64
     *
65
     * @param  string  $parameter
66
     *
67
     * @return  self
68
     */
69
    public function setParameter(string $parameter)
70
    {
71
        $this->parameter = $parameter;
72
73
        return $this;
74
    }
75
}
76