Method provideOptions
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function provideOptions()
{
return array(
array(false, array(), array(), array(), array(), array()),
array(true, array(), array(), array(), array(), array()),
- Create a ticketCreate a ticket
Method testBuildView
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testBuildView($groupEnabled, array $groupIds, array $subGroupIds, array $groupRender, array $subGroupRender, array $expectedResult)
- Create a ticketCreate a ticket
The method provideOptions() has 108 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function provideOptions()
{
return array(
array(false, array(), array(), array(), array(), array()),
array(true, array(), array(), array(), array(), array()),
- Create a ticketCreate a ticket
- Exclude checks
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
$formInterface = Phake::mock('Symfony\Component\Form\FormInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
$config = Phake::mock('Symfony\Component\Form\FormConfigInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testBuildForm'. Open
$builder = Phake::mock('Symfony\Component\Form\FormBuilderInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
$childConfig = Phake::mock('Symfony\Component\Form\FormConfigInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
$childFormInterface = Phake::mock('Symfony\Component\Form\FormInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testConfigureOptions'. Open
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
$formView = Phake::mock('Symfony\Component\Form\FormView');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Call to method mock
from undeclared class \Phake
Open
$formView = Phake::mock('Symfony\Component\Form\FormView');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder)->setAttribute('group_enabled', 'group_enabled');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$childConfig = Phake::mock('Symfony\Component\Form\FormConfigInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($formInterface)->all()->thenReturn($children);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($config)->getAttribute('sub_group_render')->thenReturn($subGroupRender);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($formInterface)->getConfig()->thenReturn($config);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$childFormInterface = Phake::mock('Symfony\Component\Form\FormInterface');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class FormTypeGroupExtensionTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$builder = Phake::mock('Symfony\Component\Form\FormBuilderInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($childFormInterface)->getName()->thenReturn($key);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder)->setAttribute('group_id', 'group_id');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder)->setAttribute('group_render', 'group_render');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($config)->getAttribute('group_enabled')->thenReturn($groupEnabled);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($childFormInterface)->getConfig()->thenReturn($childConfig);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$formInterface = Phake::mock('Symfony\Component\Form\FormInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\extension\FormTypeGroupExtensionTest::assertEquals
Open
$this->assertEquals($formView->vars['group_enabled'], $groupEnabled);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder)->setAttribute('sub_group_render', 'sub_group_render');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($config)->getAttribute('group_render')->thenReturn($groupRender);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($childConfig)->getAttribute('sub_group_id')->thenReturn($subGroupIds[$key]);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\extension\FormTypeGroupExtensionTest::assertEquals
Open
$this->assertEquals($formView->vars['group'], $expectedResult);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\extension\FormTypeGroupExtensionTest::assertSame
Open
$this->assertSame('form', $this->formExtension->getExtendedType());
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder)->setAttribute('sub_group_id', 'sub_group_id');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($childConfig)->getAttribute('group_id')->thenReturn($groupId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($resolver)->setDefaults(array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$config = Phake::mock('Symfony\Component\Form\FormConfigInterface');
- Create a ticketCreate a ticket
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
array('tabulation0', 'tabulation0', 'tabulation0', 'tabulation1', 'tabulation1', 'noTabulationDefinition', 'noTabulationDefinition'),
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
public function testBuildView($groupEnabled, array $groupIds, array $subGroupIds, array $groupRender, array $subGroupRender, array $expectedResult)
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
array('fieldset0', 'fieldset0', 'tabulation0fieldset1', 'tabulation1fieldset1', 'tabulation1fieldset0', 'fieldset0', 'noFieldsetDefinition'),
- Create a ticketCreate a ticket
- Exclude checks