SyntaxHighlighterDefaults   A
last analyzed

Complexity

Total Complexity 21

Size/Duplication

Total Lines 286
Duplicated Lines 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
eloc 51
c 6
b 0
f 0
dl 0
loc 286
rs 10
wmc 21

21 Methods

Rating   Name   Duplication   Size   Complexity  
A getClassName() 0 2 1
A getCollapse() 0 2 1
A setHighlight() 0 3 1
A setToolbar() 0 3 1
A setTabSize() 0 3 1
A setHtmlScript() 0 3 1
A setSmartTabs() 0 3 1
A getAutoLinks() 0 2 1
A getGutter() 0 2 1
A setFirstLine() 0 3 1
A setGutter() 0 3 1
A getSmartTabs() 0 2 1
A setCollapse() 0 3 1
A getTabSize() 0 2 1
A getHighlight() 0 2 1
A getFirstLine() 0 2 1
A __construct() 0 11 1
A setAutoLinks() 0 3 1
A setClassName() 0 3 1
A getToolbar() 0 2 1
A getHtmlScript() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the syntaxhighlighter-bundle package.
5
 *
6
 * (c) 2017 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\SyntaxHighlighterBundle\API;
13
14
/**
15
 * SyntaxHighlighter defaults.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\SyntaxHighlighterBundle\API
19
 */
20
class SyntaxHighlighterDefaults {
21
22
    /**
23
     * Auto links.
24
     *
25
     * @var bool
26
     */
27
    private $autoLinks;
28
29
    /**
30
     * Class name.
31
     *
32
     * @var string
33
     */
34
    private $className;
35
36
    /**
37
     * Collapse.
38
     *
39
     * @var bool
40
     */
41
    private $collapse;
42
43
    /**
44
     * First line.
45
     *
46
     * @var int
47
     */
48
    private $firstLine;
49
50
    /**
51
     * Gutter.
52
     *
53
     * @var bool
54
     */
55
    private $gutter;
56
57
    /**
58
     * Highlight.
59
     *
60
     * @var array
61
     */
62
    private $highlight;
63
64
    /**
65
     * HTML script.
66
     *
67
     * @var bool
68
     */
69
    private $htmlScript;
70
71
    /**
72
     * Samrt tabs.
73
     *
74
     * @var bool
75
     */
76
    private $smartTabs;
77
78
    /**
79
     * Tab size.
80
     *
81
     * @var int
82
     */
83
    private $tabSize;
84
85
    /**
86
     * Toolbar.
87
     *
88
     * @var bool
89
     */
90
    private $toolbar;
91
92
    /**
93
     * Constructor.
94
     */
95
    public function __construct() {
96
        $this->setAutoLinks(true);
97
        $this->setClassName("");
98
        $this->setCollapse(false);
99
        $this->setFirstLine(1);
100
        $this->setGutter(true);
101
        $this->setHighlight([]);
102
        $this->setHtmlScript(false);
103
        $this->setSmartTabs(true);
104
        $this->setTabSize(4);
105
        $this->setToolbar(true);
106
    }
107
108
    /**
109
     * Get the auto links.
110
     *
111
     * @return bool Returns the auto links.
112
     */
113
    public function getAutoLinks() {
114
        return $this->autoLinks;
115
    }
116
117
    /**
118
     * Get the class name.
119
     *
120
     * @return string Returns the class name.
121
     */
122
    public function getClassName() {
123
        return $this->className;
124
    }
125
126
    /**
127
     * Get the collapse.
128
     *
129
     * @return bool Returns the collapse.
130
     */
131
    public function getCollapse() {
132
        return $this->collapse;
133
    }
134
135
    /**
136
     * Get the first line.
137
     *
138
     * @return int Returns the first line.
139
     */
140
    public function getFirstLine() {
141
        return $this->firstLine;
142
    }
143
144
    /**
145
     * Get the gutter.
146
     *
147
     * @return bool Returns the gutter.
148
     */
149
    public function getGutter() {
150
        return $this->gutter;
151
    }
152
153
    /**
154
     * Get the highlight.
155
     *
156
     * @return array Returns the hightlight.
157
     */
158
    public function getHighlight() {
159
        return $this->highlight;
160
    }
161
162
    /**
163
     * Get the HTML script.
164
     *
165
     * @return bool Returns the HTML script.
166
     */
167
    public function getHtmlScript() {
168
        return $this->htmlScript;
169
    }
170
171
    /**
172
     * Get the smart tabs.
173
     *
174
     * @return bool Returns the smart tabs.
175
     */
176
    public function getSmartTabs() {
177
        return $this->smartTabs;
178
    }
179
180
    /**
181
     * Get the tab size.
182
     *
183
     * @return int Returns the tab size.
184
     */
185
    public function getTabSize() {
186
        return $this->tabSize;
187
    }
188
189
    /**
190
     * Get the toolbar.
191
     *
192
     * @return bool Returns the toolbar.
193
     */
194
    public function getToolbar() {
195
        return $this->toolbar;
196
    }
197
198
    /**
199
     * Set the auto links.
200
     *
201
     * @param bool $autoLinks The auto links.
202
     * @return SyntaxHighlighterDefaults Returns this defaults.
203
     */
204
    public function setAutoLinks($autoLinks) {
205
        $this->autoLinks = $autoLinks;
206
        return $this;
207
    }
208
209
    /**
210
     * Set the class name.
211
     *
212
     * @param string $className The class name.
213
     * @return SyntaxHighlighterDefaults Returns this defaults.
214
     */
215
    public function setClassName($className) {
216
        $this->className = $className;
217
        return $this;
218
    }
219
220
    /**
221
     * Set the collapse.
222
     *
223
     * @param bool $collapse The collapse.
224
     * @return SyntaxHighlighterDefaults Returns this defaults.
225
     */
226
    public function setCollapse($collapse) {
227
        $this->collapse = $collapse;
228
        return $this;
229
    }
230
231
    /**
232
     * Set the first line.
233
     *
234
     * @param int $firstLine The first line.
235
     * @return SyntaxHighlighterDefaults Returns this defaults.
236
     */
237
    public function setFirstLine($firstLine) {
238
        $this->firstLine = $firstLine;
239
        return $this;
240
    }
241
242
    /**
243
     * Set the gutter.
244
     *
245
     * @param bool $gutter The gutter.
246
     * @return SyntaxHighlighterDefaults Returns this defaults.
247
     */
248
    public function setGutter($gutter) {
249
        $this->gutter = $gutter;
250
        return $this;
251
    }
252
253
    /**
254
     * Set the highlight.
255
     *
256
     * @param array $highlight The highlight.
257
     * @return SyntaxHighlighterDefaults Returns this defaults.
258
     */
259
    public function setHighlight(array $highlight) {
260
        $this->highlight = $highlight;
261
        return $this;
262
    }
263
264
    /**
265
     * Set the HTML script.
266
     *
267
     * @param bool $htmlScript The HTML script.
268
     * @return SyntaxHighlighterDefaults Returns this defaults.
269
     */
270
    public function setHtmlScript($htmlScript) {
271
        $this->htmlScript = $htmlScript;
272
        return $this;
273
    }
274
275
    /**
276
     * Set the smart tabs.
277
     *
278
     * @param bool $smartTabs The smart tabs.
279
     * @return SyntaxHighlighterDefaults Returns this defaults.
280
     */
281
    public function setSmartTabs($smartTabs) {
282
        $this->smartTabs = $smartTabs;
283
        return $this;
284
    }
285
286
    /**
287
     * Set the tab size.
288
     *
289
     * @param int $tabSize The tab size.
290
     * @return SyntaxHighlighterDefaults Returns this defaults.
291
     */
292
    public function setTabSize($tabSize) {
293
        $this->tabSize = $tabSize;
294
        return $this;
295
    }
296
297
    /**
298
     * Set the toolbar.
299
     *
300
     * @param bool $toolbar The toolbar.
301
     * @return SyntaxHighlighterDefaults Returns this defaults.
302
     */
303
    public function setToolbar($toolbar) {
304
        $this->toolbar = $toolbar;
305
        return $this;
306
    }
307
}
308