plugins/sys/classes/yf_pcntl_signal.class.php

Summary

Maintainability
D
1 day
Test Coverage

Function _pcntl_dispatch has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

    public static function _pcntl_dispatch($options = null)
    {
        $result = false;
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
Severity: Minor
Found in plugins/sys/classes/yf_pcntl_signal.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

File yf_pcntl_signal.class.php has 274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * pcntl_signal handler
 * static class.
Severity: Minor
Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 2 hrs to fix

    Method _pcntl_dispatch has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function _pcntl_dispatch($options = null)
        {
            $result = false;
            // import options
            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
    Severity: Major
    Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 2 hrs to fix

      Function _pcntl_signal_init has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function _pcntl_signal_init($options = null)
          {
              if (is_console()) {
                  self::_pcntl_init($options);
                  $is_ttl = &self::$_pcntl_is_ttl;
      Severity: Minor
      Found in plugins/sys/classes/yf_pcntl_signal.class.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 _pcntl_init has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function _pcntl_init($options = null)
          {
              if (is_console()) {
                  // import options
                  is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
      Severity: Minor
      Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 1 hr to fix

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

            public static function _pcntl_init($options = null)
            {
                if (is_console()) {
                    // import options
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        Severity: Minor
        Found in plugins/sys/classes/yf_pcntl_signal.class.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

        Function pcntl_test has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            public function pcntl_test()
            {
                if (is_console()) {
                    // var
                    $is_terminate = &self::$_pcntl_is_terminate;
        Severity: Minor
        Found in plugins/sys/classes/yf_pcntl_signal.class.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

        Function _pcntl_log has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function _pcntl_log($options = null, $type = null)
            {
                // import options
                is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                // message
        Severity: Minor
        Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 25 mins 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

        There are no issues that match your filters.

        Category
        Status