Passed
Push — 1.5.0 ( 69a1f7...b0fcb0 )
by Sylver
03:02
created

ext::is_enableable()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 2
nc 2
nop 0
1
<?php
2
/**
3
*
4
 * @package		Breizh Smilie Creator Extension
5
 * @copyright	(c) 2018-2024 Sylver35  https://breizhcode.com
6
 * @license		http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace sylver35\smilecreator;
11
12
/**
13
* @ignore
14
*/
15
16
/**
17
 * Class ext
18
 *
19
 */
20
class ext extends \phpbb\extension\base
21
{
22
	/**
23
	 * Check whether or not the extension can be enabled.
24
	 * The current phpBB version should meet or exceed
25
	 * the minimum version required by this extension:
26
	 *
27
	 * Requires phpBB 3.3.13 and PHP 7.2
28
	 *
29
	 * @return bool
30
	 * @access public
31
	 */
32
	public function is_enableable()
33
	{
34
		$config = $this->container->get('config');
35
36
		return phpbb_version_compare($config['version'], '3.3.13', '>=') && version_compare(PHP_VERSION, '7.2', '>=');
37
	}
38
}
39