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();
- 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
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();
- 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
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();
- 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
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();
- 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
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();
- 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
Missing class import via use statement (line '63', column '39'). Open
$GLOBALS['xoTheme'] = new \xos_opal_Theme();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '66', column '30'). Open
$breadcrumbTpl = new \XoopsTpl();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Scope keyword "public" must be followed by a single space Open
public $dirname;
- Exclude checks