SyntaxHighlighterConfig   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
eloc 20
c 6
b 0
f 0
dl 0
loc 117
rs 10
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getStripBrs() 0 2 1
A setTagName() 0 3 1
A getBloggerMode() 0 2 1
A __construct() 0 4 1
A setBloggerMode() 0 3 1
A getTagName() 0 2 1
A setStripBrs() 0 3 1
A setStrings() 0 3 1
A getStrings() 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 config.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\SyntaxHighlighterBundle\API
19
 */
20
class SyntaxHighlighterConfig {
21
22
    /**
23
     * Blogger mode.
24
     *
25
     * @var bool
26
     */
27
    private $bloggerMode;
28
29
    /**
30
     * Strings
31
     *
32
     * @var SyntaxHighlighterStrings
33
     */
34
    private $strings;
35
36
    /**
37
     * Strip BRs.
38
     *
39
     * @var bool
40
     */
41
    private $stripBrs;
42
43
    /**
44
     * Tag name.
45
     *
46
     * @var string
47
     */
48
    private $tagName;
49
50
    /**
51
     * Constructor.
52
     */
53
    public function __construct() {
54
        $this->setBloggerMode(false);
55
        $this->setStripBrs(false);
56
        $this->setTagName("pre");
57
    }
58
59
    /**
60
     * Get the blogger mode.
61
     *
62
     * @return bool Returns the blogger mode.
63
     */
64
    public function getBloggerMode() {
65
        return $this->bloggerMode;
66
    }
67
68
    /**
69
     * Get the strings.
70
     *
71
     * @return SyntaxHighlighterStrings Returns the strings
72
     */
73
    public function getStrings() {
74
        return $this->strings;
75
    }
76
77
    /**
78
     * Get the strip BRs.
79
     *
80
     * @return bool Returns the strip BRs.
81
     */
82
    public function getStripBrs() {
83
        return $this->stripBrs;
84
    }
85
86
    /**
87
     * Get the tag name.
88
     *
89
     * @return string Returns the tag name.
90
     */
91
    public function getTagName() {
92
        return $this->tagName;
93
    }
94
95
    /**
96
     * Set the blogger mode.
97
     *
98
     * @param bool $bloggerMode The blogger mode.
99
     * @return SyntaxHighlighterConfig Returns this config.
100
     */
101
    public function setBloggerMode($bloggerMode) {
102
        $this->bloggerMode = $bloggerMode;
103
        return $this;
104
    }
105
106
    /**
107
     * Set the strings.
108
     *
109
     * @param SyntaxHighlighterStrings|null $strings The strings.
110
     * @return SyntaxHighlighterConfig Returns this config.
111
     */
112
    public function setStrings(SyntaxHighlighterStrings $strings = null) {
113
        $this->strings = $strings;
114
        return $this;
115
    }
116
117
    /**
118
     * Set the strip BRs.
119
     *
120
     * @param bool $stripBrs The strip BRs.
121
     * @return SyntaxHighlighterConfig Returns this config.
122
     */
123
    public function setStripBrs($stripBrs) {
124
        $this->stripBrs = $stripBrs;
125
        return $this;
126
    }
127
128
    /**
129
     * Set the tag name.
130
     *
131
     * @param string $tagName The tag name.
132
     * @return SyntaxHighlighterConfig Returns this config.
133
     */
134
    public function setTagName($tagName) {
135
        $this->tagName = $tagName;
136
        return $this;
137
    }
138
}
139