Passed
Branch master (b81125)
by Matt
05:28 queued 03:03
created

ext.php (3 issues)

Labels
Severity
1
<?php
2
/**
3
 *
4
 * Topic Preview
5
 *
6
 * @copyright (c) 2015 Matt Friedman
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace vse\topicpreview;
12
13
/**
14
 * Extension class for custom enable/disable/purge actions
15
 */
16
class ext extends \phpbb\extension\base
0 ignored issues
show
The type phpbb\extension\base was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
{
18
	/** @var string Require 3.2.0 due to updated INCLUDECSS and ordered services */
19
	const PHPBB_MIN_VERSION = '3.2.0';
20
21
	/**
22
	 * Enable extension if phpBB minimum version requirement is met
23
	 * (check database and filesystem)
24
	 *
25
	 * @return bool
26 3
	 */
27
	public function is_enableable()
28 3
	{
29 3
		$config = $this->container->get('config');
30
		return phpbb_version_compare(min($config['version'], PHPBB_VERSION), self::PHPBB_MIN_VERSION, '>=');
0 ignored issues
show
The constant vse\topicpreview\PHPBB_VERSION was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
The function phpbb_version_compare was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
		return /** @scrutinizer ignore-call */ phpbb_version_compare(min($config['version'], PHPBB_VERSION), self::PHPBB_MIN_VERSION, '>=');
Loading history...
31
	}
32
}
33