mambax7/cardealer

View on GitHub
class/Common/Breadcrumb.php

Summary

Maintainability
A
0 mins
Test Coverage

render accesses the super-global variable $GLOBALS.
Open

    public function render()
    {
        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
            require $GLOBALS['xoops']->path('class/theme.php');
            $GLOBALS['xoTheme'] = new \xos_opal_Theme();
Severity: Minor
Found in class/Common/Breadcrumb.php by phpmd

Since: PHPMD 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: http://phpmd.org/rules/controversial.txt

render accesses the super-global variable $GLOBALS.
Open

    public function render()
    {
        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
            require $GLOBALS['xoops']->path('class/theme.php');
            $GLOBALS['xoTheme'] = new \xos_opal_Theme();
Severity: Minor
Found in class/Common/Breadcrumb.php by phpmd

Since: PHPMD 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: http://phpmd.org/rules/controversial.txt

render accesses the super-global variable $GLOBALS.
Open

    public function render()
    {
        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
            require $GLOBALS['xoops']->path('class/theme.php');
            $GLOBALS['xoTheme'] = new \xos_opal_Theme();
Severity: Minor
Found in class/Common/Breadcrumb.php by phpmd

Since: PHPMD 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: http://phpmd.org/rules/controversial.txt

render accesses the super-global variable $GLOBALS.
Open

    public function render()
    {
        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
            require $GLOBALS['xoops']->path('class/theme.php');
            $GLOBALS['xoTheme'] = new \xos_opal_Theme();
Severity: Minor
Found in class/Common/Breadcrumb.php by phpmd

Since: PHPMD 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: http://phpmd.org/rules/controversial.txt

render accesses the super-global variable $GLOBALS.
Open

    public function render()
    {
        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
            require $GLOBALS['xoops']->path('class/theme.php');
            $GLOBALS['xoTheme'] = new \xos_opal_Theme();
Severity: Minor
Found in class/Common/Breadcrumb.php by phpmd

Since: PHPMD 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: http://phpmd.org/rules/controversial.txt

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 37 and the first side effect is on line 32.
Open

<?php namespace XoopsModules\Cardealer\Common;
Severity: Minor
Found in class/Common/Breadcrumb.php by phpcodesniffer

Scope keyword "public" must be followed by a single space
Open

    public  $dirname;
Severity: Minor
Found in class/Common/Breadcrumb.php by phpcodesniffer

There are no issues that match your filters.

Category
Status