Avoid using static access to class '\Phake' in method 'testNodeDelete'. Open
$nodeDeleteEvent = Phake::mock('OpenOrchestra\ModelInterface\Event\NodeDeleteEvent');
- 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->node = Phake::mock('OpenOrchestra\ModelBundle\Document\Node');
- 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->nodeEvent = Phake::mock('OpenOrchestra\ModelInterface\Event\NodeEvent');
- 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
Reference to constant NODE_UPDATE_BLOCK_POSITION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_UPDATE_BLOCK_POSITION),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_UPDATE_BLOCK
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_UPDATE_BLOCK),
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->node = Phake::mock('OpenOrchestra\ModelBundle\Document\Node');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->nodeEvent)->getNode()->thenReturn($this->node);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_CREATION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_CREATION),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_RESTORE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_RESTORE),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_UPDATE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_UPDATE),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_DELETE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_DELETE),
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->nodeEvent = Phake::mock('OpenOrchestra\ModelInterface\Event\NodeEvent');
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_DUPLICATE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_DUPLICATE),
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$nodeDeleteEvent = Phake::mock('OpenOrchestra\ModelInterface\Event\NodeDeleteEvent');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($nodeDeleteEvent)->getNodeId()->thenReturn($this->node->getNodeId());
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_ADD_LANGUAGE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_ADD_LANGUAGE),
- Create a ticketCreate a ticket
- Exclude checks