for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* extcal module.
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* @copyright XOOPS Project (http://xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @since 2.2
* @author JJDai <http://xoops.kiolo.com>
**/
//----------------------------------------------------
class Extcal_2_04
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* @param XoopsModule $module
* @param $options
*/
public function __construct(XoopsModule $module, $options)
$module
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$options
global $xoopsDB;
global
Instead of relying on global state, we recommend one of these alternatives:
function myFunction($a, $b) { // Do something }
class MyClass { private $a; private $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } public function myFunction() { // Do something } }
$sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;";
$xoopsDB->query($sql);
}
//-----------------------------------------------------------------
} // fin de la classe
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.