Issues (49)

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
	/** @var string */
22
	const PHPBB_MAX_VERSION = '4.0.0-dev';
23
24
	/**
25
	 * Enable extension if phpBB minimum version requirement is met
26 3
	 * (check database and filesystem)
27
	 *
28 3
	 * @return bool
29 3
	 */
30
	public function is_enableable()
31
	{
32
		$config = $this->container->get('config');
33
		return phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=')
0 ignored issues
show
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

33
		return /** @scrutinizer ignore-call */ phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=')
Loading history...
34
			&& phpbb_version_compare($config['version'], self::PHPBB_MAX_VERSION, '<')
35
			&& phpbb_version_compare(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...
36
			&& phpbb_version_compare(PHPBB_VERSION, self::PHPBB_MAX_VERSION, '<');
37
	}
38
}
39