1 | <?php |
||
11 | class Markdown extends NamedElement |
||
12 | { |
||
13 | protected $type = 'markdown'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $configs; |
||
19 | |||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $highlight = true; |
||
24 | |||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $autoInit = true; |
||
29 | |||
30 | /** |
||
31 | * @return array |
||
32 | */ |
||
33 | public function getConfigs(): array |
||
41 | |||
42 | /** |
||
43 | * @return array |
||
44 | */ |
||
45 | protected function getDefaultConfigs() |
||
51 | |||
52 | /** |
||
53 | * @param array $configs |
||
54 | * |
||
55 | * @return Markdown |
||
56 | */ |
||
57 | public function setConfigs(array $configs): Markdown |
||
63 | |||
64 | /** |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function isHighlight(): bool |
||
71 | |||
72 | /** |
||
73 | * |
||
74 | * @return Markdown |
||
75 | */ |
||
76 | public function disableHighlight(): Markdown |
||
82 | |||
83 | /** |
||
84 | * @return bool |
||
85 | */ |
||
86 | public function isAutoInit(): bool |
||
90 | |||
91 | /** |
||
92 | * |
||
93 | * @return Markdown |
||
94 | */ |
||
95 | public function disableAutoInit(): Markdown |
||
101 | |||
102 | public function toArray() |
||
110 | } |
||
111 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.