Issues (97)

1
<?php
2
/**
3
 *
4
 * Advertisement management. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\ads;
12
13
class ext extends \phpbb\extension\base
14
{
15
	public const DATE_FORMAT = 'Y-m-d';
16
	public const MAX_NAME_LENGTH = 255;
17
	public const DEFAULT_PRIORITY = 5;
18
	public const AD_BLOCK_MODES = [0, 1, 2];
19
20
	/**
21
	 * {@inheritdoc}
22
	 *
23
	 * Requires phpBB 3.3.2 due to using role_exists check in permission migration.
24
	 */
25
	public function is_enableable()
26
	{
27
		return phpbb_version_compare(PHPBB_VERSION, '3.3.2', '>=')
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

27
		return /** @scrutinizer ignore-call */ phpbb_version_compare(PHPBB_VERSION, '3.3.2', '>=')
Loading history...
The constant phpbb\ads\PHPBB_VERSION was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
28
			&& phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<');
29
	}
30
}
31