Method testBuildView
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testBuildView($isInitial, $isTranslation, $isPublished, $isautoPublish, $isAutounpublish, array $expectedProperties)
- Create a ticketCreate a ticket
Avoid using static access to class '\Phake' in method 'testBuilder'. Open
$builder = Phake::mock('Symfony\Component\Form\FormBuilder');
- 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
$view = 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
$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 'testBuilder'. Open
Phake::when($builder)->addEventSubscriber(Phake::anyParameters())->thenReturn($builder);
- 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 'testBuilder'. Open
Phake::when($builder)->add(Phake::anyParameters())->thenReturn($builder);
- 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 'testBuilder'. Open
Phake::verify($builder, Phake::times(5))->add(Phake::anyParameters());
- 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
$status = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- 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 'testBuilder'. Open
Phake::verify($builder, Phake::times(5))->add(Phake::anyParameters());
- 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\Workflow\Tests\Form\Type\StatusTypeTest::assertSame
Open
$this->assertSame('test', $view->vars['delete_help_text']);
- 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 method anyParameters
from undeclared class \Phake
Open
Phake::when($builder)->addEventSubscriber(Phake::anyParameters())->thenReturn($builder);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertInstanceOf
Open
$this->assertInstanceOf('Symfony\Component\Form\AbstractType', $this->form);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($status)->isAutoUnpublishToState()->thenReturn($isAutounpublish);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($form)->getData()->thenReturn($status);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($status)->isInitialState()->thenReturn($isInitial);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$view = Phake::mock('Symfony\Component\Form\FormView');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertTrue
Open
$this->assertTrue($view->vars['enable_delete_button']);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class StatusTypeTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($builder, Phake::times(5))->add(Phake::anyParameters());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertSame
Open
$this->assertSame(true, isset($view->vars['properties']));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertSame
Open
$this->assertSame($expectedProperties, $view->vars['properties']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$builder = Phake::mock('Symfony\Component\Form\FormBuilder');
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::verify($builder, Phake::times(5))->add(Phake::anyParameters());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$form = Phake::mock('Symfony\Component\Form\FormInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($status)->isPublishedState()->thenReturn($isPublished);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($builder)->add(Phake::anyParameters())->thenReturn($builder);
- Create a ticketCreate a ticket
- Exclude checks
Call to method times
from undeclared class \Phake
Open
Phake::verify($builder, Phake::times(5))->add(Phake::anyParameters());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertTrue
Open
$this->assertTrue($view->vars['delete_button']);
- 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 when
from undeclared class \Phake
Open
Phake::when($status)->isTranslationState()->thenReturn($isTranslation);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($status)->isAutoPublishFromState()->thenReturn($isautoPublish);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertSame
Open
$this->assertSame('oo_status', $this->form->getName());
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($builder)->addEventSubscriber(Phake::anyParameters())->thenReturn($builder);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$status = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($builder)->add(Phake::anyParameters())->thenReturn($builder);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Form\Type\StatusTypeTest::assertTrue
Open
$this->assertTrue($view->vars['new_button']);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
public function testBuildView($isInitial, $isTranslation, $isPublished, $isautoPublish, $isAutounpublish, array $expectedProperties)
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
array(true , true , true , true , true , array($initial, $translation, $published, $autoPublish, $autoUnpublish))
- Create a ticketCreate a ticket
- Exclude checks