Showing 3,032 of 3,032 total issues
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
publisher_notify_iteminfo accesses the super-global variable $GLOBALS. Open
function publisher_notify_iteminfo($category, $itemId)
{
if ('global' === $category) {
$item['name'] = '';
$item['url'] = '';
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
publisher_notify_iteminfo accesses the super-global variable $GLOBALS. Open
function publisher_notify_iteminfo($category, $itemId)
{
if ('global' === $category) {
$item['name'] = '';
$item['url'] = '';
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
publisher_notify_iteminfo accesses the super-global variable $GLOBALS. Open
function publisher_notify_iteminfo($category, $itemId)
{
if ('global' === $category) {
$item['name'] = '';
$item['url'] = '';
- 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
The function publisher_search() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10. Open
function publisher_search($queryArray, $andor, $limit, $offset, $userid, $categories = [], $sortby = 0, $searchin = '', $extra = '')
{
$helper = Helper::getInstance();
$ret = $item = [];
$hightlightKey = '';
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
The method __construct() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10. Open
public function __construct()
{
global $allowedSites;
$this->startTime = microtime(true);
date_default_timezone_set('UTC');
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
serveErrors accesses the super-global variable $_SERVER. Open
protected function serveErrors()
{
header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
if (!DISPLAY_ERROR_MESSAGES) {
return;
- 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
serveErrors accesses the super-global variable $_SERVER. Open
protected function serveErrors()
{
header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
if (!DISPLAY_ERROR_MESSAGES) {
return;
- 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
getLocalImagePath accesses the super-global variable $_SERVER. Open
protected function getLocalImagePath($src)
{
$src = ltrim($src, '/'); //strip off the leading '/'
if (!$this->docRoot) {
$this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
- 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
publisher_items_menu_show accesses the super-global variable $GLOBALS. Open
function publisher_items_menu_show($options)
{
$block = [];
$helper = Helper::getInstance();
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
xoops_module_update_publisher accesses the super-global variable $GLOBALS. Open
function xoops_module_update_publisher(\XoopsModule $module, ?string $previousVersion = null)
{
// global $GLOBALS['xoopsDB'];
$moduleDirName = \basename(\dirname(__DIR__));
// $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
- 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
getIP accesses the super-global variable $_SERVER. Open
protected function getIP()
{
$rem = @$_SERVER['REMOTE_ADDR'];
$ff = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$ci = @$_SERVER['HTTP_CLIENT_IP'];
- 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
publisher_tag_iteminfo accesses the super-global variable $GLOBALS. Open
function publisher_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
- 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
The function publisher_items_new_show() has a Cyclomatic Complexity of 25. The configured cyclomatic complexity threshold is 10. Open
function publisher_items_new_show($options)
{
$helper = Helper::getInstance();
/** @var ItemHandler $itemHandler */
$itemHandler = $helper->getHandler('Item');
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}