Method generateOptions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateOptions()
{
return array(
array(null,
array(
- Create a ticketCreate a ticket
Avoid using static access to class '\Phake' in method 'setUp'. Open
$this->event = Phake::mock('Symfony\Component\Form\FormEvent');
- 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 'setUp'. Open
$this->form = 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 'setUp'. Open
$this->data = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');
- 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 'setUp'. Open
$child = 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 'setUp'. Open
$resolvedFormType = Phake::mock('Symfony\Component\Form\ResolvedFormTypeInterface');
- 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 'testOnPreSetData'. Open
Phake::verify($this->form, Phake::times($nbrCall))->add('contentTypeId', 'text', $expectedOptions);
- 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 'setUp'. Open
$this->formConfig = 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
Call to method when
from undeclared class \Phake
Open
Phake::when($this->formConfig)->getOptions()->thenReturn($options);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->event)->getData()->thenReturn($this->data);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\EventSubscriber\ContentTypeTypeSubscriberTest::assertArrayHasKey
Open
$this->assertArrayHasKey(FormEvents::PRE_SET_DATA, $this->subscriber->getSubscribedEvents());
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class ContentTypeTypeSubscriberTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($child)->getName()->thenReturn('contentTypeId');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($this->form, Phake::times($nbrCall))->add('contentTypeId', 'text', $expectedOptions);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($resolvedFormType)->getName()->thenReturn('text');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($child)->getConfig()->thenReturn($this->formConfig);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->event)->getForm()->thenReturn($this->form);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->data = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->formConfig = Phake::mock('Symfony\Component\Form\FormConfigInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->formConfig)->getType()->thenReturn($resolvedFormType);
- Create a ticketCreate a ticket
- Exclude checks
Call to method times
from undeclared class \Phake
Open
Phake::verify($this->form, Phake::times($nbrCall))->add('contentTypeId', 'text', $expectedOptions);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->event = Phake::mock('Symfony\Component\Form\FormEvent');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->data)->getContentTypeId()->thenReturn($contentTypeId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\EventSubscriber\ContentTypeTypeSubscriberTest::assertInstanceOf
Open
$this->assertInstanceOf('Symfony\Component\EventDispatcher\EventSubscriberInterface', $this->subscriber);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant PRE_SET_DATA
from undeclared class \Symfony\Component\Form\FormEvents
Open
$this->assertArrayHasKey(FormEvents::PRE_SET_DATA, $this->subscriber->getSubscribedEvents());
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->event)->getData()->thenReturn($this->data);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->form = Phake::mock('Symfony\Component\Form\FormInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$child = Phake::mock('Symfony\Component\Form\FormInterface');;
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$resolvedFormType = Phake::mock('Symfony\Component\Form\ResolvedFormTypeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->form)->get('contentTypeId')->thenReturn($child);
- Create a ticketCreate a ticket
- Exclude checks
Each PHP statement must be on a line by itself Open
$child = Phake::mock('Symfony\Component\Form\FormInterface');;
- Create a ticketCreate a ticket
- Exclude checks