preloads/core.php
eventCoreIndexStart accesses the super-global variable $_SESSION. Open
Open
public static function eventCoreIndexStart(array $args): void
{
// check once per user session if expired poll email has been sent
if (empty($_SESSION['pollChecked'])) {
$pollHandler = Helper::getInstance()->getHandler('Poll');
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
eventCoreIndexStart accesses the super-global variable $_SESSION. Open
Open
public static function eventCoreIndexStart(array $args): void
{
// check once per user session if expired poll email has been sent
if (empty($_SESSION['pollChecked'])) {
$pollHandler = Helper::getInstance()->getHandler('Poll');
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Avoid unused parameters such as '$args'. Open
Open
public static function eventCoreIndexStart(array $args): void
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$args'. Open
Open
public static function eventCoreIncludeCommonEnd(array $args): void
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class XoopspollCorePreload extends \XoopsPreloadItem
- Exclude checks