XoopsModules25x/news

View on GitHub
submit.php

Summary

Maintainability
C
1 day
Test Coverage

File submit.php has 504 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);
/*
 * 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: Major
Found in submit.php - About 1 day to fix

    Consider simplifying this complex logical expression.
    Open

        if ($approveprivilege && 'edit' === $_GET['op']) {
            $op      = 'edit';
            $storyid = Request::getInt('storyid', 0, 'GET');
        } elseif ($approveprivilege && 'delete' === $_GET['op']) {
            $op      = 'delete';
    Severity: Critical
    Found in submit.php - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                          if (!unlink($currentPicture)) {
                              trigger_error('Error, impossible to delete the picture attached to this article');
                          }
      Severity: Major
      Found in submit.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if (!$sfiles->store()) {
                                            echo _AM_UPLOAD_DBERROR_SAVE;
                                        }
        Severity: Major
        Found in submit.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if (file_exists($newName)) {
                                          @unlink($fullPictureName);
                                          rename($newName, $fullPictureName);
                                      }
          Severity: Major
          Found in submit.php - About 45 mins to fix

            There are no issues that match your filters.

            Category
            Status