| Conditions | 4 |
| Paths | 6 |
| Total Lines | 19 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 38 | public function get_tools() |
|
| 34 | { |
||
| 35 | 38 | $tools = array(); |
|
| 36 | |||
| 37 | /** @var tools\tool_interface $tool */ |
||
| 38 | 38 | foreach ($this->tools as $tool) |
|
| 39 | { |
||
| 40 | 38 | if ($tool->is_available()) |
|
| 41 | 38 | { |
|
| 42 | 38 | $tools[$tool->get_name()] = $tool; |
|
| 43 | 38 | } |
|
| 44 | 38 | } |
|
| 45 | |||
| 46 | 38 | if (isset($tools['bbcodes'])) |
|
| 47 | 38 | { |
|
| 48 | 13 | unset($tools['bbcodes_legacy']); |
|
| 49 | 13 | } |
|
| 50 | |||
| 51 | 38 | return $tools; |
|
| 52 | } |
||
| 75 |