XoopsModules25x/tag

View on GitHub
include/tagbar.php

Summary

Maintainability
A
0 mins
Test Coverage

tagBar accesses the super-global variable $GLOBALS.
Open

function tagBar($tags, int $catid = 0, int $modid = 0): array
{
    $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
    trigger_error(__FUNCTION__ . " is deprecated, called from {$trace[0]['file']} line {$trace[0]['line']}");
    $GLOBALS['xoopsLogger']->addDeprecated(
Severity: Minor
Found in include/tagbar.php by phpmd

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

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 33 and the first side effect is on line 25.
Open

<?php declare(strict_types=1);
Severity: Minor
Found in include/tagbar.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Tag\{
Severity: Minor
Found in include/tagbar.php by phpcodesniffer

Line exceeds 120 characters; contains 183 characters
Open

        'Tag Module: ' . __FUNCTION__ . " function  is deprecated since Tag 2.3.5, please use 'Tag\Tagbar' class instead." . " Called from {$trace[0]['file']}line {$trace[0]['line']}"
Severity: Minor
Found in include/tagbar.php by phpcodesniffer

There are no issues that match your filters.

Category
Status