mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Function GENEALOGY has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

function GENEALOGY()
{
    global $IDs, $fathers, $mothers, $inds, $nb_gen, $nb_maxi, $nbani, $nl, $sql1;
    $impr       = 0;
    $fathers[0] = $IDs[1];
Severity: Minor
Found in coi.php - About 5 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

Function AlphaChannelFlatten has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

    public function AlphaChannelFlatten()
    {
        if (!$this->is_alpha) {
            // image doesn't have alpha transparency, no need to flatten
            $this->DebugMessage('skipping AlphaChannelFlatten() because !$this->is_alpha', __FILE__, __LINE__);
Severity: Minor
Found in phpthumb/phpthumb.class.php - About 5 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 menu_block has 138 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function menu_block()
{
    $moduleDirName = basename(\dirname(__DIR__));
    $helper        = Helper::getInstance();

Severity: Major
Found in blocks/menu_block.php - About 5 hrs to fix

    Method completeCallback has 137 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function completeCallback()
        {
            //can this field be searched
            $search = $this->getValue('hassearch');
            if ('hassearch' === $search) {
    Severity: Major
    Found in class/CheckoutWizard.php - About 5 hrs to fix

      Function getBmp has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getBmp($bgColor)
          {
              $out = '';
      
              if (!$this->m_bLoaded) {
      Severity: Minor
      Found in phpthumb/phpthumb.gif.php - About 5 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

      File tools.php has 382 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/tools.php - About 5 hrs to fix

        File ImageColor.php has 380 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace XoopsModules\Pedigree;
        
        /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
        Severity: Minor
        Found in class/ImageColor.php - About 5 hrs to fix

          Method RenderOutput has 128 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function RenderOutput()
              {
                  if (!$this->useRawIMoutput && !(is_resource($this->gdimg_output) || (is_object($this->gdimg_source) && $this->gdimg_source instanceof \GdImage))) {
                      $this->DebugMessage('RenderOutput() failed because !is_resource($this->gdimg_output)', __FILE__, __LINE__);
                      return false;
          Severity: Major
          Found in phpthumb/phpthumb.class.php - About 5 hrs to fix

            Function createList has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
            Open

                public static function createList($result, $prefix, $link, $element)
                {
                    $helper = XoopsModules\Pedigree\Helper::getInstance();
                    require_once $helper->path('include/common.php');
            
            
            Severity: Minor
            Found in class/Utility.php - About 5 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

            Function AlphaChannelFlatten has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
            Open

                public function AlphaChannelFlatten()
                {
                    if (!$this->is_alpha) {
                        // image doesn't have alpha transparency, no need to flatten
                        $this->DebugMessage('skipping AlphaChannelFlatten() because !$this->is_alpha', __FILE__, __LINE__);
            Severity: Minor
            Found in 0old/phpthumb/phpthumb.class.php - About 5 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

            Function RenderOutput has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
            Open

                public function RenderOutput()
                {
                    if (!$this->useRawIMoutput && !(is_resource($this->gdimg_output) || (is_object($this->gdimg_source) && $this->gdimg_source instanceof \GdImage))) {
                        $this->DebugMessage('RenderOutput() failed because !is_resource($this->gdimg_output)', __FILE__, __LINE__);
                        return false;
            Severity: Minor
            Found in phpthumb/phpthumb.class.php - About 5 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 ExtractEXIFgetImageSize has 123 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function ExtractEXIFgetImageSize()
                {
                    $this->DebugMessage('starting ExtractEXIFgetImageSize()', __FILE__, __LINE__);
            
                    if (preg_match('#^http:#i', $this->src) && !$this->sourceFilename && $this->rawImageData) {
            Severity: Major
            Found in 0old/phpthumb/phpthumb.class.php - About 4 hrs to fix

              Method ExtractEXIFgetImageSize has 123 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function ExtractEXIFgetImageSize()
                  {
                      $this->DebugMessage('starting ExtractEXIFgetImageSize()', __FILE__, __LINE__);
              
                      if (preg_match('#^http:#i', $this->src) && !$this->sourceFilename && $this->rawImageData) {
              Severity: Major
              Found in phpthumb/phpthumb.class.php - About 4 hrs to fix

                Function LZWCommand has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function LZWCommand(&$data, $bInit)
                    {
                        if ($bInit) {
                            $this->SetCodeSize = ord($data[0]);
                            $data              = substr($data, 1);
                Severity: Minor
                Found in phpthumb/phpthumb.gif.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

                File CheckoutWizard.php has 369 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                namespace XoopsModules\Pedigree;
                
                //require_once __DIR__ . '/wizard.php';
                Severity: Minor
                Found in class/CheckoutWizard.php - About 4 hrs to fix

                  phpthumb_filters has 37 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class phpthumb_filters
                  {
                      /**
                       * @var phpthumb
                       */
                  Severity: Minor
                  Found in phpthumb/phpthumb.filters.php - About 4 hrs to fix

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

                    function createList($result, $prefix, $link, $element)
                    {
                        global $xoopsTpl;
                        $animal = new Pedigree\Animal();
                        //test to find out how many user fields there are...
                    Severity: Minor
                    Found in include/functions.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

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

                        public function process($action, $form, $process = true)
                        {
                            if ($action == $this->resetAction) {
                                $this->clearContainer();
                                $this->setCurrentStep($this->getFirstIncompleteStep());
                    Severity: Minor
                    Found in class/ZervWizard.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

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

                        public static function createList($result, $prefix, $link, $element)
                        {
                            global $xoopsTpl;
                            $animal = new Pedigree\Animal();
                            //test to find out how many user fields there are...
                    Severity: Minor
                    Found in 0old/pedigreeUtilities0.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

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

                        public function SetCacheFilename()
                        {
                            if (null !== $this->cache_filename) {
                                $this->DebugMessage('$this->cache_filename already set, skipping SetCacheFilename()', __FILE__, __LINE__);
                                return true;
                    Severity: Minor
                    Found in phpthumb/phpthumb.class.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

                    Severity
                    Category
                    Status
                    Source
                    Language