Passed
Push — master ( 2b6e79...81856e )
by Matt
01:27
created
Labels
Severity
1
<?php
2
/**
3
 *
4
 * Topic Image Preview. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017, Matt Friedman
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace vse\topicimagepreview;
12
13
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...
14
{
15
	/**
16
	 * The minimum phpBB version required by this extension
17
	 */
18
	const PHPBB_MIN_VERSION = '3.2.1';
19
20
	/**
21
	 * {@inheritdoc}
22
	 */
23
	public function is_enableable()
24
	{
25
		// Require minimum phpBB version.
26
		$is_enableable = phpbb_version_compare(PHPBB_VERSION, self::PHPBB_MIN_VERSION, '>=');
0 ignored issues
show
The constant vse\topicimagepreview\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

26
		$is_enableable = /** @scrutinizer ignore-call */ phpbb_version_compare(PHPBB_VERSION, self::PHPBB_MIN_VERSION, '>=');
Loading history...
27
28
		// If not enableable, add our custom install error language keys
29
		if (!$is_enableable)
30
		{
31
			$lang = $this->container->get('language');
32
			$lang->add_lang('tip_install', 'vse/topicimagepreview');
33
		}
34
35
		return $is_enableable;
36
	}
37
}
38