Backoffice/Tests/Form/Type/Component/DefaultListableCheckboxTypeTest.php
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
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
Avoid using static access to class '\Phake' in method 'testBuildView'. Open
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
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open
Open
$this->assertEquals(CheckboxType::class, $this->form->getParent());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$formView = Phake::mock('Symfony\Component\Form\FormView');
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant class
from undeclared class \Symfony\Component\Form\Extension\Core\Type\CheckboxType
Open
Open
$this->assertEquals(CheckboxType::class, $this->form->getParent());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$formInterface = Phake::mock('Symfony\Component\Form\FormInterface');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
Open
class DefaultListableCheckboxTypeTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open
Open
$this->assertEquals($formView->vars['label'], $label);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open
Open
$this->assertEquals('oo_default_listable_checkbox', $this->form->getName());
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
Open
"Other label" => array('label2', 'open_orchestra_backoffice.form.content_type.default_listable_label.label2'),
- Create a ticketCreate a ticket
- Exclude checks