Avoid using static access to class '\Phake' in method 'testProcessWithMapper'. Open
$definition = Phake::mock(Definition::CLASS);
- 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->containerBuilder = Phake::mock(ContainerBuilder::CLASS);
- 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 'testProcessWithMapper'. Open
Phake::when($this->containerBuilder)->getDefinition(Phake::anyParameters())->thenReturn($definition);
- 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 'testProcessWithMapper'. Open
Phake::when($this->containerBuilder)->has(Phake::anyParameters())->thenReturn(true);
- 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->containerBuilder)->getDefinition(Phake::anyParameters())->thenReturn($definition);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant class
from undeclared class \Symfony\Component\DependencyInjection\Definition
Open
$definition = Phake::mock(Definition::CLASS);
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->containerBuilder)->has(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant class
from undeclared class \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Open
$this->assertInstanceOf(CompilerPassInterface::CLASS, $this->compiler);
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->containerBuilder)->getDefinition(Phake::anyParameters())->thenReturn($definition);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($this->containerBuilder)->has('open_orchestra_elastica_admin.mapper.form');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->containerBuilder = Phake::mock(ContainerBuilder::CLASS);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($definition)->addMethodCall('addMappingConfiguration', array('embedded_content', 'object'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Tests\DependencyInjection\Compiler\FieldToElasticaTypeCompilerPassTest::assertInstanceOf
Open
$this->assertInstanceOf(CompilerPassInterface::CLASS, $this->compiler);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$definition = Phake::mock(Definition::CLASS);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($definition)->addMethodCall('addMappingConfiguration', array('date', 'date'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($definition)->addMethodCall('addMappingConfiguration', array('integer', 'double'));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant class
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
$this->containerBuilder = Phake::mock(ContainerBuilder::CLASS);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->containerBuilder)->has(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \PHPUnit_Framework_TestCase
Open
class FieldToElasticaTypeCompilerPassTest extends \PHPUnit_Framework_TestCase
- Create a ticketCreate a ticket
- Exclude checks