Backoffice/Tests/Form/Type/Component/OperatorChoiceTypeTest.php
Avoid using static access to class '\Phake' in method 'testConfigureOptions'. Open
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
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\OperatorChoiceTypeTest::assertEquals
Open
Open
$this->assertEquals('choice', $this->form->getParent());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\OperatorChoiceTypeTest::assertEquals
Open
Open
$this->assertEquals('oo_operator_choice', $this->form->getName());
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant CHOICE_AND
from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
'empty_data' => ContentRepositoryInterface::CHOICE_AND,
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\Validator\Constraints\NotBlank
Open
Open
'constraints' => new NotBlank(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Open
Phake::verify($resolver)->setDefaults(
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant CHOICE_AND
from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
ContentRepositoryInterface::CHOICE_AND => 'open_orchestra_backoffice.form.content_list.choice_type_and',
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
Open
class OperatorChoiceTypeTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\OperatorChoiceTypeTest::assertInstanceOf
Open
Open
$this->assertInstanceOf('Symfony\Component\Form\AbstractType', $this->form);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant CHOICE_OR
from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open
Open
ContentRepositoryInterface::CHOICE_OR => 'open_orchestra_backoffice.form.content_list.choice_type_or',
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
Open
ContentRepositoryInterface::CHOICE_OR => 'open_orchestra_backoffice.form.content_list.choice_type_or',
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
ContentRepositoryInterface::CHOICE_AND => 'open_orchestra_backoffice.form.content_list.choice_type_and',
- Create a ticketCreate a ticket
- Exclude checks