XoopsModules25x/apcal

View on GitHub
admin/pluginsmanager.php

Summary

Maintainability
A
3 hrs
Test Coverage

File pluginsmanager.php has 319 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 admin/pluginsmanager.php - About 3 hrs to fix

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

    <?php
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Blank line found at start of control structure
    Open

    if (!empty($_POST['update'])) {
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                                     "\r\n\0", '   ');
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 150 characters
    Open

    $prs = $GLOBALS['xoopsDB']->query("SELECT * FROM $cal->plugin_table WHERE ($whr_type) AND ($whr_dirname) AND ($whr_file) ORDER BY $order, pi_weight");
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 314 characters
    Open

                if (!$GLOBALS['xoopsDB']->query("UPDATE $cal->plugin_table SET pi_type='$pi_type4sql', pi_options='$pi_options4sql', pi_weight='$pi_weight4sql', pi_title='$pi_title4sql', pi_dirname='$pi_dirname4sql', pi_file='$pi_file4sql', pi_dotgif='$pi_dotgif4sql', pi_enabled='$pi_enabled4sql' WHERE pi_id=$pi_id",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 194 characters
    Open

        $redirect_str4header = strtr("Location: $cal->connection://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?mes=$mes&limit_type=$limit_type&limit_dirname=$limit_dirname&limit_file=$limit_file",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 130 characters
    Open

            <td colspan='9' align='right' class='head'><input type='submit' name='update' value='" . _AM_APCAL_BTN_UPDATE . "' /></td>
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 283 characters
    Open

                if (!$GLOBALS['xoopsDB']->query("INSERT INTO $cal->plugin_table SET pi_type='$type4sql', pi_options='$pi_options4sql', pi_weight='$pi_weight4sql', pi_title='$pi_title4sql', pi_dirname='$pi_dirname4sql', pi_file='$pi_file4sql', pi_dotgif='$pi_dotgif4sql', pi_enabled='1'",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Line exceeds 120 characters; contains 185 characters
    Open

        <form class='apcalForm' id='MainForm' name='MainForm' action='?limit_type=$limit_type&amp;limit_dirname=$limit_dirname&amp;limit_file=$limit_file' method='post' style='margin:0px;'>
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                if (!$GLOBALS['xoopsDB']->query("INSERT INTO $cal->plugin_table SET pi_type='$type4sql', pi_options='$pi_options4sql', pi_weight='$pi_weight4sql', pi_title='$pi_title4sql', pi_dirname='$pi_dirname4sql', pi_file='$pi_file4sql', pi_dotgif='$pi_dotgif4sql', pi_enabled='1'",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Multi-line function call not indented correctly; expected 12 spaces but found 44
    Open

                                                $conn)
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                                                $conn)
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Multi-line function call not indented correctly; expected 12 spaces but found 44
    Open

                                                $conn)
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

        $redirect_str4header = strtr("Location: $cal->connection://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?mes=$mes&limit_type=$limit_type&limit_dirname=$limit_dirname&limit_file=$limit_file",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                                                $conn)
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                if (!$GLOBALS['xoopsDB']->query("UPDATE $cal->plugin_table SET pi_type='$pi_type4sql', pi_options='$pi_options4sql', pi_weight='$pi_weight4sql', pi_title='$pi_title4sql', pi_dirname='$pi_dirname4sql', pi_file='$pi_file4sql', pi_dotgif='$pi_dotgif4sql', pi_enabled='$pi_enabled4sql' WHERE pi_id=$pi_id",
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    Multi-line function call not indented correctly; expected 4 spaces but found 33
    Open

                                     "\r\n\0", '   ');
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

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

                                     "\r\n\0", '   ');
    Severity: Minor
    Found in admin/pluginsmanager.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status