XoopsModules25x/xoopspartners

View on GitHub
admin/main.php

Summary

Maintainability
B
4 hrs
Test Coverage

File main.php has 345 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
Severity: Minor
Found in admin/main.php - About 4 hrs to fix

    Line exceeds 120 characters; contains 203 characters
    Open

                echo "        <tr>\n" . "          <td class='{$class} width20 center middle'>" . "<a href='{$url}' rel='external'>{$title}</a>" . "</td>\n" . "          <td class='{$class} width3 center'>";
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 133 characters
    Open

            $formStat     = new \XoopsFormRadioYN(_AM_XOOPSPARTNERS_STATUS, 'status', Constants::STATUS_ACTIVE, $statOnTxt, $statOffTxt);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 136 characters
    Open

                $helper->redirect("admin/main.php?op=edit_partner&amp;id={$id}", Constants::REDIRECT_DELAY_SHORT, _AM_XOOPSPARTNERS_BESURE);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 142 characters
    Open

                $helper->redirect('admin/main.php?op=partnersAdminAdd', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_EMPTYDATABASE, false);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 135 characters
    Open

                        $order   = (!empty($order) && ((int)$order > Constants::DEFAULT_WEIGHT)) ? (int)$order : Constants::DEFAULT_WEIGHT;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 131 characters
    Open

                $formDesc   = new \XoopsFormTextArea(_AM_XOOPSPARTNERS_DESCRIPTION, 'description', $partnerVars['description'], 5, 51);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 176 characters
    Open

    $status = isset($_POST['status']) ? is_array($_POST['status']) ? Request::getArray('status', [], 'POST') : Request::getInt('status', Constants::STATUS_INACTIVE, 'POST') : null;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 184 characters
    Open

                $statOnTxt  = "<img src='" . Admin::iconUrl('on.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_ACTIVE . "'>" . _AM_XOOPSPARTNERS_ACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 189 characters
    Open

                $statOffTxt = "<img src='" . Admin::iconUrl('off.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_INACTIVE . "'>" . _AM_XOOPSPARTNERS_INACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 175 characters
    Open

    $weight = isset($_POST['weight']) ? is_array($_POST['weight']) ? Request::getArray('weight', [], 'POST') : Request::getInt('weight', Constants::DEFAULT_WEIGHT, 'POST') : null;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 150 characters
    Open

                        $stat    = (!empty($status[$id]) && ($status[$id] > Constants::STATUS_INACTIVE)) ? (int)$status[$id] : Constants::STATUS_INACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 264 characters
    Open

            echo "      <tr>\n" . "        <td class='foot right' colspan='7'>\n" . "        <input type='hidden' name='op' value='reorderPartners'>\n" . "{$adminButtons}\n" . "        </td>\n" . "      </tr>\n" . "      </tbody>\n" . "    </table>\n" . "  </form>\n";
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 139 characters
    Open

                $helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 198 characters
    Open

            $statOffTxt   = "<img src='" . Admin::iconUrl('off.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_INACTIVE . "'>" . '&nbsp;' . _AM_XOOPSPARTNERS_INACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 127 characters
    Open

            $status      = (!empty($status) && ($status > Constants::STATUS_INACTIVE)) ? (int)$status : Constants::STATUS_INACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 193 characters
    Open

            $statOnTxt    = "<img src='" . Admin::iconUrl('on.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_ACTIVE . "'>" . '&nbsp;' . _AM_XOOPSPARTNERS_ACTIVE;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 159 characters
    Open

                echo "      <tr>\n" . "        <td class='{$class} center bold line140' colspan='7'>" . _AM_XOOPSPARTNERS_NOPARTNERS . "</td>\n" . "      </tr>\n";
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 142 characters
    Open

                $helper->redirect('admin/main.php?op=partnersAdminAdd', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_EMPTYDATABASE, false);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 179 characters
    Open

                $helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_NOTUPDATED . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 284 characters
    Open

                $adminButtons = "        <input type='button' " . "name='button' " . "onclick=\"location='main.php?op=reorderAutoPartners'\" " . "value='" . _AM_XOOPSPARTNERS_AUTOMATIC_SORT . "'>\n" . "        <input type='submit' name='submit' value='" . _AM_XOOPSPARTNERS_UPDATE . "'>";
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 133 characters
    Open

                $formStat   = new \XoopsFormRadioYN(_AM_XOOPSPARTNERS_STATUS, 'status', $partnerVars['status'], $statOnTxt, $statOffTxt);
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 175 characters
    Open

            $helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_NOTUPDATED . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 132 characters
    Open

                    $errorMsg    = ($imageWidth > $maxWidth || $imageHeight > $maxHeight) ? '<br>' . _AM_XOOPSPARTNERS_IMAGE_ERROR : '';
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    Line exceeds 120 characters; contains 177 characters
    Open

                    echo "<img src='{$image}' alt='{$title}' " . "style='width: " . (int)(.65 * $imageWidth) . 'px; ' . 'height: ' . (int)(.65 * $imageHeight) . "px;'>" . $errorMsg;
    Severity: Minor
    Found in admin/main.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status