Total Complexity | 8 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class bbcodes_legacy extends base |
||
16 | { |
||
17 | /** @var config */ |
||
18 | protected $config; |
||
19 | |||
20 | /** @var string Regex data of BBCodes to remove */ |
||
21 | protected $data; |
||
22 | |||
23 | /** |
||
24 | * Constructor |
||
25 | * |
||
26 | * @param config $config Config object |
||
27 | */ |
||
28 | 38 | public function __construct(config $config) |
|
29 | { |
||
30 | 38 | $this->config = $config; |
|
31 | 38 | } |
|
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | 28 | public function run() |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | 28 | public function set_data() |
|
45 | { |
||
46 | 28 | if (!isset($this->data) || is_array($this->data)) |
|
47 | 28 | { |
|
48 | 28 | $strip_bbcodes = !empty($this->config['topic_preview_strip_bbcodes']) ? 'flash|' . trim($this->config['topic_preview_strip_bbcodes']) : 'flash'; |
|
49 | 28 | $this->data = '#\[(' . $strip_bbcodes . ')[^\[\]]*\]((?:(?!\[\1[^\[\]]*\]).)*)\[\/\1[^\[\]]*\]#Usi'; |
|
50 | 28 | } |
|
51 | |||
52 | 28 | return $this; |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * Remove specified BBCodes and their contents |
||
57 | * Uses recursion to handle nested BBCodes |
||
58 | * |
||
59 | * @return string Stripped message text |
||
60 | */ |
||
61 | 28 | protected function process() |
|
70 | } |
||
71 | } |
||
72 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths