tests/HtmlUtilityTest.php
Method testGenerateDropDownList
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGenerateDropDownList()
{
$utility = new HtmlUtility();
$ios = [
Method testGenerateCheckboxes
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGenerateCheckboxes()
{
$utility = new HtmlUtility();
$ios = [
File HtmlUtilityTest.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace CodeJetter\tests;
use CodeJetter\core\utility\HtmlUtility;
Method testGenerateRadioButtons
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGenerateRadioButtons()
{
$utility = new HtmlUtility();
$ios = [
The method testGenerateDropDownList() has 133 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function testGenerateDropDownList()
{
$utility = new HtmlUtility();
$ios = [
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
'o' => "<select name='statuses'><option value='a'>0</option><option value='b' selected>1</option></select>",
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
Open
'o' => "<div><label><input type='checkbox' value='a'> a</label></div><div><label><input type='checkbox' value='b'> b</label></div>",
- Exclude checks
Line exceeds 120 characters; contains 196 characters Open
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>",
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
Open
$this->assertEquals($io['o'], $utility->generateDropDownList($io['i']['options'], $io['i']['name'], $io['i']['selected'], $io['i']['configs']));
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
Open
'o' => "<select name='statuses'><option value='a'>Title A</option><option value='b' selected>Title B</option></select>",
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
Open
$this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked']));
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
Open
$this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
Open
$this->assertEquals($io['o'], $utility->generateRadioButtons($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
Open
'o' => "<select name='statuses'><option value='a'>Title A</option><option value='b' selected>b</option></select>",
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
Open
'o' => "<select name='statuses' multiple><option value='a' selected>A</option><option value='b' selected>B</option></select>",
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
Open
$this->assertEquals($io['o'], $utility->generateCheckboxes($io['i']['options'], $io['i']['name'], $io['i']['checked'], $io['i']['configs']));
- Exclude checks
Line exceeds 120 characters; contains 178 characters Open
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>",
- Exclude checks
Line exceeds 120 characters; contains 181 characters Open
Open
'o' => "<select name='statuses' data-placeholder='select one item ...' multiple><option value='a' selected>A</option><option value='b' selected>B</option></select>",
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
Open
$this->assertEquals($io['o'], $utility->generateRadioButtons($io['i']['options'], $io['i']['name'], $io['i']['checked']));
- Exclude checks
Line exceeds 120 characters; contains 188 characters Open
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>",
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
Open
'o' => "<div><label><input type='radio' value='a'> a</label></div><div><label><input type='radio' value='b'> b</label></div>",
- Exclude checks
Line exceeds 120 characters; contains 178 characters Open
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>",
- Exclude checks
Line exceeds 120 characters; contains 196 characters Open
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>",
- Exclude checks