These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * @package Com_Localise |
||
4 | * @subpackage com_localise.script |
||
5 | * |
||
6 | * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. |
||
7 | * @license GNU General Public License version 2 or later; see LICENSE.txt |
||
8 | */ |
||
9 | |||
10 | defined('_JEXEC') or die; |
||
11 | |||
12 | /** |
||
13 | * Installation class to perform additional changes during install/uninstall/update |
||
14 | * |
||
15 | * @package Localise |
||
16 | * @since 4.0 |
||
17 | */ |
||
18 | class Com_LocaliseInstallerScript |
||
19 | { |
||
20 | /** |
||
21 | * Minimum supported version of the CMS |
||
22 | * |
||
23 | * @var string |
||
24 | * @since 4.0 |
||
25 | */ |
||
26 | protected $minCmsVersion = '3.3'; |
||
27 | |||
28 | /** |
||
29 | * Function to act prior to installation process begins |
||
30 | * |
||
31 | * @param string $type The action being performed |
||
32 | * @param JInstallerComponent $parent The class calling this method |
||
33 | * |
||
34 | * @return boolean True on success |
||
35 | * |
||
36 | * @since 4.0 |
||
37 | */ |
||
38 | public function preflight($type, $parent) |
||
0 ignored issues
–
show
|
|||
39 | { |
||
40 | if (version_compare(JVERSION, $this->minCmsVersion, 'lt')) |
||
41 | { |
||
42 | JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_LOCALISE_ERROR_INSTALL_JVERSION', $this->minCmsVersion)); |
||
43 | |||
44 | return false; |
||
45 | } |
||
46 | |||
47 | return true; |
||
48 | } |
||
49 | } |
||
50 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.