Completed
Pull Request — master (#25)
by Matt
02:02
created

ext::is_enableable()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 3
nc 3
nop 0
1
<?php
2
/**
3
 *
4
 * Precise Similar Topics
5
 *
6
 * @copyright (c) 2018 Matt Friedman
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace vse\similartopics;
12
13
class ext extends \phpbb\extension\base
14
{
15
	public function is_enableable()
16
	{
17
		$db = $this->container->get('dbal.conn');
18
		return ($db->get_sql_layer() === 'mysql4' || $db->get_sql_layer() === 'mysqli' || $db->get_sql_layer() === 'postgres');
19
	}
20
}
21