Avoid using static access to class '\Phake' in method 'testTransform'. Open
Phake::when($valueTransformer)->support(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
Avoid using static access to class '\Phake' in method 'testTransform'. Open
Phake::when($valueTransformer)->transform(Phake::anyParameters())->thenReturn('foo');
- 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 'provideNoString'. Open
array(Phake::mock('stdClass')),
- 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 'testTransform'. Open
$valueTransformer = Phake::mock('OpenOrchestra\Backoffice\ValueTransformer\ValueTransformerInterface');
- 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 anyParameters
from undeclared class \Phake
Open
Phake::when($valueTransformer)->support(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class ValueTransformerManagerTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($valueTransformer)->getName()->thenReturn('foo');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
array(Phake::mock('stdClass')),
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$valueTransformer = Phake::mock('OpenOrchestra\Backoffice\ValueTransformer\ValueTransformerInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($valueTransformer)->support('foo','bar');
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($valueTransformer)->transform(Phake::anyParameters())->thenReturn('foo');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($valueTransformer)->support(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\ValueTransformer\ValueTransformerManagerTest::assertEquals
Open
$this->assertEquals($value, 'bar');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\ValueTransformer\ValueTransformerManagerTest::assertEquals
Open
$this->assertEquals($value, 'foo');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($valueTransformer)->transform(Phake::anyParameters())->thenReturn('foo');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\ValueTransformer\ValueTransformerManagerTest::setExpectedException
Open
$this->setExpectedException('OpenOrchestra\Backoffice\Exception\ValueTransfomationFailedException');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($valueTransformer)->transform('bar');
- Create a ticketCreate a ticket
- Exclude checks
No space found after comma in function call Open
$value = $this->manager->transform('foo','bar');
- Create a ticketCreate a ticket
- Exclude checks
No space found after comma in function call Open
Phake::verify($valueTransformer)->support('foo','bar');
- Create a ticketCreate a ticket
- Exclude checks
No space found after comma in function call Open
$value = $this->manager->transform('foo','bar');
- Create a ticketCreate a ticket
- Exclude checks