iranianpep/code-jetter

View on GitHub
tests/HtmlUtilityTest.php

Summary

Maintainability
C
1 day
Test Coverage

Method testGenerateDropDownList has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testGenerateDropDownList()
    {
        $utility = new HtmlUtility();

        $ios = [
Severity: Major
Found in tests/HtmlUtilityTest.php - About 5 hrs to fix

    Method testGenerateCheckboxes has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function testGenerateCheckboxes()
        {
            $utility = new HtmlUtility();
    
            $ios = [
    Severity: Major
    Found in tests/HtmlUtilityTest.php - About 2 hrs to fix

      File HtmlUtilityTest.php has 251 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace CodeJetter\tests;
      
      use CodeJetter\core\utility\HtmlUtility;
      Severity: Minor
      Found in tests/HtmlUtilityTest.php - About 2 hrs to fix

        Method testGenerateRadioButtons has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function testGenerateRadioButtons()
            {
                $utility = new HtmlUtility();
        
                $ios = [
        Severity: Minor
        Found in tests/HtmlUtilityTest.php - About 1 hr to fix

          The method testGenerateDropDownList() has 133 lines of code. Current threshold is set to 100. Avoid really long methods.
          Open

              public function testGenerateDropDownList()
              {
                  $utility = new HtmlUtility();
          
                  $ios = [
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpmd

          Line exceeds 120 characters; contains 124 characters
          Open

                          'o' => "<select name='statuses'><option value='a'>0</option><option value='b' selected>1</option></select>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 148 characters
          Open

                          'o' => "<div><label><input type='checkbox' value='a'> a</label></div><div><label><input type='checkbox' value='b'> b</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 196 characters
          Open

                          'o' => "<div><label><input type='checkbox' name='groups[]' value='a' checked> a</label></div><div><label><input type='checkbox' name='groups[]' value='b' checked> b</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 156 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateDropDownList($io['i']['options'], $io['i']['name'], $io['i']['selected'], $io['i']['configs']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 136 characters
          Open

                          'o' => "<select name='statuses'><option value='a'>Title A</option><option value='b' selected>Title B</option></select>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 132 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 153 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 155 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateRadioButtons($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 130 characters
          Open

                          'o' => "<select name='statuses'><option value='a'>Title A</option><option value='b' selected>b</option></select>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 142 characters
          Open

                          'o' => "<select name='statuses' multiple><option value='a' selected>A</option><option value='b' selected>B</option></select>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 153 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 178 characters
          Open

                          'o' => "<div><label><input type='radio' name='groups' value='a'> A</label></div><div><label><input type='radio' name='groups' value='b' checked> B</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 181 characters
          Open

                          'o' => "<select name='statuses' data-placeholder='select one item ...' multiple><option value='a' selected>A</option><option value='b' selected>B</option></select>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 134 characters
          Open

                      $this->assertEquals($io['o'], $utility->generateRadioButtons($io['i']['options'], $io['i']['name'], $io['i']['checked']));
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 188 characters
          Open

                          'o' => "<div><label><input type='checkbox' name='groups[]' value='a' checked> A</label></div><div><label><input type='checkbox' name='groups[]' value='b'> B</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 142 characters
          Open

                          'o' => "<div><label><input type='radio' value='a'> a</label></div><div><label><input type='radio' value='b'> b</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 178 characters
          Open

                          'o' => "<div><label><input type='radio' name='groups' value='a'> a</label></div><div><label><input type='radio' name='groups' value='b' checked> b</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          Line exceeds 120 characters; contains 196 characters
          Open

                          'o' => "<div><label><input type='checkbox' name='groups[]' value='a' checked> A</label></div><div><label><input type='checkbox' name='groups[]' value='b' checked> B</label></div>",
          Severity: Minor
          Found in tests/HtmlUtilityTest.php by phpcodesniffer

          There are no issues that match your filters.

          Category
          Status