XoopsModules25x/apcal

View on GitHub
include/blocksadmin.inc.php

Summary

Maintainability
F
6 days
Test Coverage

myblocksadmin_update_blockinstance accesses the super-global variable $GLOBALS.
Open

function myblocksadmin_update_blockinstance(
    $id,
    $bside,
    $bweight,
    $bvisible,
Severity: Minor
Found in include/blocksadmin.inc.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

myblocksadmin_update_blockinstance accesses the super-global variable $GLOBALS.
Open

function myblocksadmin_update_blockinstance(
    $id,
    $bside,
    $bweight,
    $bvisible,
Severity: Minor
Found in include/blocksadmin.inc.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

myblocksadmin_update_blockinstance accesses the super-global variable $GLOBALS.
Open

function myblocksadmin_update_blockinstance(
    $id,
    $bside,
    $bweight,
    $bvisible,
Severity: Minor
Found in include/blocksadmin.inc.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

myblocksadmin_update_blockinstance accesses the super-global variable $GLOBALS.
Open

function myblocksadmin_update_blockinstance(
    $id,
    $bside,
    $bweight,
    $bvisible,
Severity: Minor
Found in include/blocksadmin.inc.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

File blocksadmin.inc.php has 493 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
Severity: Minor
Found in include/blocksadmin.inc.php - About 7 hrs to fix

    Function myblocksadmin_update_block has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    function myblocksadmin_update_block(
        $bid,
        $bside,
        $bweight,
        $bvisible,
    Severity: Minor
    Found in include/blocksadmin.inc.php - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method myblocksadmin_update_block has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function myblocksadmin_update_block(
        $bid,
        $bside,
        $bweight,
        $bvisible,
    Severity: Major
    Found in include/blocksadmin.inc.php - About 2 hrs to fix

      Method myblocksadmin_update_blockinstance has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function myblocksadmin_update_blockinstance(
          $id,
          $bside,
          $bweight,
          $bvisible,
      Severity: Minor
      Found in include/blocksadmin.inc.php - About 1 hr to fix

        Method myblocksadmin_update_blockinstance has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            $id,
            $bside,
            $bweight,
            $bvisible,
            $btitle,
        Severity: Major
        Found in include/blocksadmin.inc.php - About 1 hr to fix

          Function myblocksadmin_update_blockinstance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          function myblocksadmin_update_blockinstance(
              $id,
              $bside,
              $bweight,
              $bvisible,
          Severity: Minor
          Found in include/blocksadmin.inc.php - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method myblocksadmin_update_block has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              $bid,
              $bside,
              $bweight,
              $bvisible,
              $btitle,
          Severity: Major
          Found in include/blocksadmin.inc.php - About 1 hr to fix

            The function myblocksadmin_update_block has 10 parameters. Consider reducing the number of parameters to less than 10.
            Open

            function myblocksadmin_update_block(
                $bid,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            The function myblocksadmin_update_blockinstance() has 104 lines of code. Current threshold is set to 100. Avoid really long methods.
            Open

            function myblocksadmin_update_blockinstance(
                $id,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            The function myblocksadmin_update_blockinstance has 11 parameters. Consider reducing the number of parameters to less than 10.
            Open

            function myblocksadmin_update_blockinstance(
                $id,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            The function myblocksadmin_update_block() has an NPath complexity of 1560. The configured NPath complexity threshold is 200.
            Open

            function myblocksadmin_update_block(
                $bid,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            NPathComplexity

            Since: 0.1

            The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

            Example

            class Foo {
                function bar() {
                    // lots of complicated code
                }
            }

            Source https://phpmd.org/rules/codesize.html#npathcomplexity

            The function myblocksadmin_update_block() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10.
            Open

            function myblocksadmin_update_block(
                $bid,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            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

            Missing class import via use statement (line '566', column '20').
            Open

                $myblock = new XoopsBlock($bid);
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            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 '612', column '25').
            Open

                    $xoopsTpl = new XoopsTpl();
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            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

            The method myblocksadmin_update_blockinstance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                } else {
                    // insert
                    $instance = $instanceHandler->create();
                    $instance->setVar('bid', $bid);
                    $instance->setVar('side', $bside);
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            ElseExpression

            Since: 1.4.0

            An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

            Example

            class Foo
            {
                public function bar($flag)
                {
                    if ($flag) {
                        // one branch
                    } else {
                        // another branch
                    }
                }
            }

            Source https://phpmd.org/rules/cleancode.html#elseexpression

            The method myblocksadmin_update_block uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                    } else {
                        if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block' . $bid)) {
                            if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block' . $bid)) {
                                $msg = 'Unable to clear cache for block ID' . $bid;
                            }
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            ElseExpression

            Since: 1.4.0

            An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

            Example

            class Foo
            {
                public function bar($flag)
                {
                    if ($flag) {
                        // one branch
                    } else {
                        // another branch
                    }
                }
            }

            Source https://phpmd.org/rules/cleancode.html#elseexpression

            Avoid using static access to class 'XoopsDatabaseFactory' in method 'myblocksadmin_update_block'.
            Open

                    $db  = XoopsDatabaseFactory::getDatabaseConnection();
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            StaticAccess

            Since: 1.4.0

            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

            Example

            class Foo
            {
                public function bar()
                {
                    Bar::baz();
                }
            }

            Source https://phpmd.org/rules/cleancode.html#staticaccess

            The method myblocksadmin_update_block uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                } else {
                    $msg = 'Failed update of block. ID:' . $bid;
                }
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            ElseExpression

            Since: 1.4.0

            An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

            Example

            class Foo
            {
                public function bar($flag)
                {
                    if ($flag) {
                        // one branch
                    } else {
                        // another branch
                    }
                }
            }

            Source https://phpmd.org/rules/cleancode.html#elseexpression

            Avoid unused parameters such as '$bcontent'.
            Open

                $bcontent,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            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 '$bctype'.
            Open

                $bctype,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            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 local variables such as '$xoopsConfig'.
            Open

                global $xoopsConfig;
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            UnusedLocalVariable

            Since: 0.2

            Detects when a local variable is declared and/or assigned, but not used.

            Example

            class Foo {
                public function doSomething()
                {
                    $i = 5; // Unused
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

            Avoid unused local variables such as '$xoopsDB'.
            Open

                global $xoopsDB;
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            UnusedLocalVariable

            Since: 0.2

            Detects when a local variable is declared and/or assigned, but not used.

            Example

            class Foo {
                public function doSomething()
                {
                    $i = 5; // Unused
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

            TODO found
            Open

            // TODO  edit2, delete2, customblocks
            Severity: Minor
            Found in include/blocksadmin.inc.php by fixme

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            if ($op === 'clone') {
                xoops_cp_header();
                $myblock = new XoopsBlock($bid);
            
                $db      = XoopsDatabaseFactory::getDatabaseConnection();
            Severity: Major
            Found in include/blocksadmin.inc.php and 1 other location - About 1 day to fix
            include/blocksadmin.inc.php on lines 364..404

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 391.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            if ($op === 'edit') {
                xoops_cp_header();
                // edit_block($bid); GIJ imported from blocksadmin.php
                $myblock = new XoopsBlock($bid);
            
            
            Severity: Major
            Found in include/blocksadmin.inc.php and 1 other location - About 1 day to fix
            include/blocksadmin.inc.php on lines 406..443

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 391.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Avoid variables with short names like $id. Configured minimum length is 3.
            Open

                $id,
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            ShortVariable

            Since: 0.2

            Detects when a field, local, or parameter has a very short name.

            Example

            class Something {
                private $q = 15; // VIOLATION - Field
                public static function main( array $as ) { // VIOLATION - Formal
                    $r = 20 + $this->q; // VIOLATION - Local
                    for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                        $r += $this->q;
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#shortvariable

            Avoid variables with short names like $db. Configured minimum length is 3.
            Open

                    $db  = XoopsDatabaseFactory::getDatabaseConnection();
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpmd

            ShortVariable

            Since: 0.2

            Detects when a field, local, or parameter has a very short name.

            Example

            class Something {
                private $q = 15; // VIOLATION - Field
                public static function main( array $as ) { // VIOLATION - Formal
                    $r = 20 + $this->q; // VIOLATION - Local
                    for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                        $r += $this->q;
                    }
                }
            }

            Source https://phpmd.org/rules/naming.html#shortvariable

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

            <?php
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Blank line found at start of control structure
            Open

                } else {
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Blank line found at start of control structure
            Open

                if (isset($_POST['addblock']) && is_array($_POST['addblock'])) {
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Only one argument is allowed per line in a multi-line function call
            Open

                    xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $myblock->getVar('bid')) + $xoopsGTicket->getTicketArray(__LINE__, 1800, 'myblocksadmin'), 'admin.php',
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 168 characters
            Open

                echo '<a href="myblocksadmin.php">' . _AM_APCAL_BADMIN . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . _AM_APCAL_EDITBLOCK . '<br><br>';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 169 characters
            Open

                echo '<a href="myblocksadmin.php">' . _AM_APCAL_BADMIN . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . $block['form_title'] . '<br><br>';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 185 characters
            Open

                    xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $myblock->getVar('bid')) + $xoopsGTicket->getTicketArray(__LINE__, 1800, 'myblocksadmin'), 'admin.php',
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 176 characters
            Open

                        myblocksadmin_update_blockinstance($i, $side[$i], $_POST['weight'][$i], $visible[$i], $_POST['title'][$i], null, null, $_POST['bcachetime'][$i], $bmodule, array());
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 173 characters
            Open

                //echo '<a href="admin.php?fct=blocksadmin">'. _AM_APCAL_BADMIN .'</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'.$block['form_title'].'<br><br>';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 151 characters
            Open

                preview_window = openWithSelfMain("'.XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200);
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 164 characters
            Open

                    myblocksadmin_update_block($i, $side[$i], $_POST['weight'][$i], $visible[$i], $_POST['title'][$i], null, null, $_POST['bcachetime'][$i], $bmodule, array());
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 460 characters
            Open

                //  $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.$xoopsConfig['sitename'].'</title><link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" /></head><body><table><tr><th>'.$myblock->getVar('title').'</th></tr><tr><td>'.$myblock->getContent('S', $bctype).'</td></tr></table></body></html>';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 156 characters
            Open

                $sql    = 'SELECT gperm_groupid FROM ' . $db->prefix('group_permission') . " WHERE gperm_name='block_read' AND gperm_modid='1' AND gperm_itemid='$bid'";
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 163 characters
            Open

                    $sql = 'INSERT INTO ' . $db->prefix('group_permission') . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES ($gid, $newid, 1, 'block_read')";
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 135 characters
            Open

                        $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int)$bmid);
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 163 characters
            Open

                echo '<a href="myblocksadmin.php">' . _AM_APCAL_BADMIN . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . _AM_CLONEBLOCK . '<br><br>';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 131 characters
            Open

                    $sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newid . ', ' . $bmid . ')';
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 157 characters
            Open

                    $GLOBALS['xoopsDB']->query('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('block_module_link') . ' WHERE block_id=' . $instance->getVar('instanceid'));
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Line exceeds 120 characters; contains 178 characters
            Open

                        $sql = "INSERT INTO ".$db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (".$groups[$i].", ".$newid.", 1, 'block_read')";
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Opening parenthesis of a multi-line function call must be the last content on the line
            Open

                    xoops_confirm(array('fct' => 'blocksadmin', 'op' => 'delete_ok', 'bid' => $myblock->getVar('bid')) + $xoopsGTicket->getTicketArray(__LINE__, 1800, 'myblocksadmin'), 'admin.php',
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Multi-line function call not indented correctly; expected 8 spaces but found 22
            Open

                                  sprintf(_AM_APCAL_RUSUREDEL, $myblock->getVar('title')));
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            Closing parenthesis of a multi-line function call must be on a line by itself
            Open

                                  sprintf(_AM_APCAL_RUSUREDEL, $myblock->getVar('title')));
            Severity: Minor
            Found in include/blocksadmin.inc.php by phpcodesniffer

            There are no issues that match your filters.

            Category
            Status