Completed
Push — master ( 89c9f0...9aceec )
by Thomas Mauro
06:33
created

ClientOptions   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 157
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

14 Methods

Rating   Name   Duplication   Size   Complexity  
A getDsn() 0 4 1
A setDsn() 0 5 1
A getOptions() 0 4 1
A setOptions() 0 5 1
A isRegisterExceptionHandler() 0 4 1
A setRegisterExceptionHandler() 0 5 1
A isRegisterErrorHandler() 0 4 1
A setRegisterErrorHandler() 0 5 1
A isRegisterShutdownFunction() 0 4 1
A setRegisterShutdownFunction() 0 5 1
A isRegisterErrorListener() 0 4 1
A setRegisterErrorListener() 0 5 1
A getErrorHandlerListener() 0 4 1
A setErrorHandlerListener() 0 5 1
1
<?php
2
3
namespace Facile\SentryModule\Options;
4
5
use Facile\SentryModule\Listener\ErrorHandlerListener;
6
use Zend\Stdlib\AbstractOptions;
7
8
class ClientOptions extends AbstractOptions
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $dsn;
14
    /**
15
     * @var array
16
     */
17
    protected $options = [];
18
    /**
19
     * @var bool
20
     */
21
    protected $registerExceptionHandler = false;
22
    /**
23
     * @var bool
24
     */
25
    protected $registerErrorHandler = false;
26
    /**
27
     * @var bool
28
     */
29
    protected $registerShutdownFunction = false;
30
    /**
31
     * @var bool
32
     */
33
    protected $registerErrorListener = false;
34
    /**
35
     * @var string
36
     */
37
    protected $errorHandlerListener = ErrorHandlerListener::class;
38
39
    /**
40
     * @return string
41
     */
42
    public function getDsn()
43
    {
44
        return $this->dsn;
45
    }
46
47
    /**
48
     * @param string $dsn
49
     * @return $this
50
     */
51
    public function setDsn($dsn)
52
    {
53
        $this->dsn = $dsn;
54
        return $this;
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getOptions()
61
    {
62
        return $this->options;
63
    }
64
65
    /**
66
     * @param array $options
67
     * @return $this
68
     */
69
    public function setOptions(array $options)
70
    {
71
        $this->options = $options;
72
        return $this;
73
    }
74
75
    /**
76
     * @return boolean
77
     */
78
    public function isRegisterExceptionHandler()
79
    {
80
        return $this->registerExceptionHandler;
81
    }
82
83
    /**
84
     * @param boolean $registerExceptionHandler
85
     * @return $this
86
     */
87
    public function setRegisterExceptionHandler($registerExceptionHandler)
88
    {
89
        $this->registerExceptionHandler = $registerExceptionHandler;
90
        return $this;
91
    }
92
93
    /**
94
     * @return boolean
95
     */
96
    public function isRegisterErrorHandler()
97
    {
98
        return $this->registerErrorHandler;
99
    }
100
101
    /**
102
     * @param boolean $registerErrorHandler
103
     * @return $this
104
     */
105
    public function setRegisterErrorHandler($registerErrorHandler)
106
    {
107
        $this->registerErrorHandler = $registerErrorHandler;
108
        return $this;
109
    }
110
111
    /**
112
     * @return boolean
113
     */
114
    public function isRegisterShutdownFunction()
115
    {
116
        return $this->registerShutdownFunction;
117
    }
118
119
    /**
120
     * @param boolean $registerShutdownFunction
121
     * @return $this
122
     */
123
    public function setRegisterShutdownFunction($registerShutdownFunction)
124
    {
125
        $this->registerShutdownFunction = $registerShutdownFunction;
126
        return $this;
127
    }
128
129
    /**
130
     * @return boolean
131
     */
132
    public function isRegisterErrorListener()
133
    {
134
        return $this->registerErrorListener;
135
    }
136
137
    /**
138
     * @param boolean $registerErrorListener
139
     * @return $this
140
     */
141
    public function setRegisterErrorListener($registerErrorListener)
142
    {
143
        $this->registerErrorListener = $registerErrorListener;
144
        return $this;
145
    }
146
147
    /**
148
     * @return string
149
     */
150
    public function getErrorHandlerListener()
151
    {
152
        return $this->errorHandlerListener;
153
    }
154
155
    /**
156
     * @param string $errorHandlerListener
157
     * @return $this
158
     */
159
    public function setErrorHandlerListener($errorHandlerListener)
160
    {
161
        $this->errorHandlerListener = $errorHandlerListener;
162
        return $this;
163
    }
164
}
165