Showing 40 of 40 total issues

Method init has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function init()
    {
        parent::init();
        $this->_a['table'] = 'tms_tests';
        $this->_a['verbose'] = 'TMS Test';
Severity: Major
Found in src/TMS/Test.php - About 3 hrs to fix

    Method init has 78 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function init()
        {
            parent::init();
            $this->_a['table'] = 'tms_activities';
            $this->_a['verbose'] = 'TMS Activity';
    Severity: Major
    Found in src/TMS/Activity.php - About 3 hrs to fix

      File project.php has 295 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      return array(
          // ************************************************************* Schema
          array(
              'regex' => '#^/projects/schema$#',
      Severity: Minor
      Found in src6/urls/project.php - About 3 hrs to fix

        Method init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function init()
            {
                parent::init();
                $this->_a['table'] = 'tms_test_acceptance_criteria';
                $this->_a['verbose'] = 'TMS TestAcceptanceCriterion';
        Severity: Major
        Found in src/TMS/TestAcceptanceCriterion.php - About 2 hrs to fix

          Method init has 57 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function init()
              {
                  parent::init();
                  $this->_a['table'] = 'tms_activity_logs';
                  $this->_a['verbose'] = 'TMS Activity Log';
          Severity: Major
          Found in src/TMS/ActivityLog.php - About 2 hrs to fix

            Method init has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function init()
                {
                    $this->_a['table'] = 'tms_test_histories';
                    $this->_a['verbose'] = 'TMS Test History';
                    $this->_a['cols'] = array(
            Severity: Major
            Found in src/TMS/TestHistory.php - About 2 hrs to fix

              Method init has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function init()
                  {
                      $this->_a['table'] = 'tms_test_comments';
                      $this->_a['verbose'] = 'TMS Test Comment';
                      $this->_a['cols'] = array(
              Severity: Major
              Found in src/TMS/TestComment.php - About 2 hrs to fix

                Method init has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function init()
                    {
                        $this->_a['table'] = 'tms_activity_comments';
                        $this->_a['verbose'] = 'TMS Activity Commment';
                        $this->_a['cols'] = array(
                Severity: Major
                Found in src/TMS/ActivityComment.php - About 2 hrs to fix

                  Method init has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function init()
                      {
                          parent::init();
                          $this->_a['table'] = 'tms_projects';
                          $this->_a['verbose'] = 'TMS Project';
                  Severity: Minor
                  Found in src/TMS/Project.php - About 2 hrs to fix

                    Method init has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function init()
                        {
                            $this->_a['cols'] = array(
                                // Identifier
                                'id' => array(
                    Severity: Minor
                    Found in src/TMS/ModelBinary.php - About 1 hr to fix

                      Method init has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function init()
                          {
                              parent::init();
                              $this->_a['table'] = 'tms_test_runs';
                              $this->_a['verbose'] = 'TMS Test Run';
                      Severity: Minor
                      Found in src/TMS/TestRun.php - About 1 hr to fix

                        Method init has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function init()
                            {
                                $this->_a['table'] = 'tms_test_variables';
                                $this->_a['verbose'] = 'TMS Test Variable';
                                $this->_a['cols'] = array(
                        Severity: Minor
                        Found in src/TMS/TestVariable.php - About 1 hr to fix

                          Method attachCommands has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private static function attachCommands($job, $test)
                              {
                                  $builder = new TMS_ScriptBuilder();
                                  $command = '';
                                  // Create JMX file
                          Severity: Minor
                          Found in src/TMS/PiplineBuilder.php - About 1 hr to fix

                            Method init has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function init()
                                {
                                    parent::init();
                                    $this->_a['table'] = 'tms_test_risks';
                                    $this->_a['verbose'] = 'TMS Test Risk';
                            Severity: Minor
                            Found in src/TMS/TestRisk.php - About 1 hr to fix

                              Method init has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function init()
                                  {
                                      parent::init();
                                      $this->_a['table'] = 'tms_activity_steps';
                                      $this->_a['verbose'] = 'TMS Activity Step';
                              Severity: Minor
                              Found in src/TMS/ActivityStep.php - About 1 hr to fix

                                Method attachResources has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private static function attachResources($job, $test)
                                    {
                                        // Attachments
                                        $attachList = $test->get_attachments_list();
                                        foreach ($attachList as $attach) {
                                Severity: Minor
                                Found in src/TMS/PiplineBuilder.php - About 1 hr to fix

                                  Method attachVariables has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private static function attachVariables($job, $test, $testRun)
                                      {
                                          // test_name
                                          $attr = new Pluf\Jms\Attribute();
                                          $attr->name = 'test_name';
                                  Severity: Minor
                                  Found in src/TMS/PiplineBuilder.php - About 1 hr to fix

                                    Method init has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function init()
                                        {
                                            parent::init();
                                            $this->_a['table'] = 'tms_test_run_reports';
                                            $this->_a['verbose'] = 'TMS Test Run Report';
                                    Severity: Minor
                                    Found in src/TMS/TestRunReport.php - About 1 hr to fix

                                      Function attachCommands has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          private static function attachCommands($job, $test)
                                          {
                                              $builder = new TMS_ScriptBuilder();
                                              $command = '';
                                              // Create JMX file
                                      Severity: Minor
                                      Found in src/TMS/PiplineBuilder.php - About 45 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

                                      Function attachVariables has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          private static function attachVariables($job, $test, $testRun)
                                          {
                                              // test_name
                                              $attr = new Pluf\Jms\Attribute();
                                              $attr->name = 'test_name';
                                      Severity: Minor
                                      Found in src/TMS/PiplineBuilder.php - About 35 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language