Avoid using static access to class '\Phake' in method 'setUp'. Open
$childNode = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
- 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->previousStatus = 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 'setUp'. Open
$this->redirectionManager = Phake::mock('OpenOrchestra\Backoffice\Manager\RedirectionManager');
- 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
Avoid using static access to class '\Phake' in method 'setUp'. Open
$this->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 'setUp'. Open
$this->nodeRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');
- 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 'testUpdateRedirection'. Open
Phake::verify($this->redirectionManager, Phake::times($nbrCall))->generateRedirectionForNode($this->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->node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
- 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($childNode)->getNodeId()->thenReturn($this->otherNodeId);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_CHANGE_STATUS
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->assertArrayHasKey(NodeEvents::NODE_CHANGE_STATUS, $this->subscriber->getSubscribedEvents());
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->node)->getStatus()->thenReturn($this->status);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->node)->getNodeId()->thenReturn($this->nodeId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$childNode = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->nodeRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class UpdateRedirectionNodeSubscriberTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->status)->isPublishedState()->thenReturn(false);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($childNode)->getSiteId()->thenReturn($this->siteId);
- 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
Call to undeclared method \OpenOrchestra\Backoffice\Tests\EventSubscriber\UpdateRedirectionNodeSubscriberTest::assertArrayHasKey
Open
$this->assertArrayHasKey(NodeEvents::NODE_CHANGE_STATUS, $this->subscriber->getSubscribedEvents());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->previousStatus = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\Backoffice\Tests\EventSubscriber\UpdateRedirectionNodeSubscriberTest->previousStatus
Open
$this->previousStatus = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->nodeEvent)->getPreviousStatus()->thenReturn($this->previousStatus);
- Create a ticketCreate a ticket
- Exclude checks
Call to method times
from undeclared class \Phake
Open
Phake::verify($this->redirectionManager, Phake::times($nbrCall))->generateRedirectionForNode($this->node);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->status = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->node)->getSiteId()->thenReturn($this->siteId);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\Backoffice\Tests\EventSubscriber\UpdateRedirectionNodeSubscriberTest->previousStatus
Open
Phake::when($this->nodeEvent)->getPreviousStatus()->thenReturn($this->previousStatus);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->nodeRepository)->findByParent($this->nodeId, $this->siteId)->thenReturn(array($childNode, $childNode));
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->previousStatus)->isPublishedState()->thenReturn($isPublishedState);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\Backoffice\Tests\EventSubscriber\UpdateRedirectionNodeSubscriberTest->previousStatus
Open
Phake::when($this->previousStatus)->isPublishedState()->thenReturn($isPublishedState);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->nodeRepository)->findByParent($this->otherNodeId, $this->siteId)->thenReturn(array());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->redirectionManager = Phake::mock('OpenOrchestra\Backoffice\Manager\RedirectionManager');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
- 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
Call to method when
from undeclared class \Phake
Open
Phake::when($this->node)->getLanguage()->thenReturn($this->language);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\EventSubscriber\UpdateRedirectionNodeSubscriberTest::assertInstanceOf
Open
$this->assertInstanceOf('Symfony\Component\EventDispatcher\EventSubscriberInterface', $this->subscriber);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($this->redirectionManager, Phake::times($nbrCall))->generateRedirectionForNode($this->node);
- Create a ticketCreate a ticket
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
Phake::when($this->nodeRepository)->findByParent($this->nodeId, $this->siteId)->thenReturn(array($childNode, $childNode));
- Create a ticketCreate a ticket
- Exclude checks