Avoid using static access to class '\Phake' in method 'provideGroupAndParameters'. Open
$group1 = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- 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 'provideGroupAndParameters'. Open
$group0 = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- 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->userRepository = Phake::mock('OpenOrchestra\UserBundle\Repository\UserRepositoryInterface');
- 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 mock
from undeclared class \Phake
Open
$this->userRepository = Phake::mock('OpenOrchestra\UserBundle\Repository\UserRepositoryInterface');
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest->strategy
Open
$this->strategy = new GroupStrategy($this->userRepository);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest::assertEquals
Open
$this->assertEquals(array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($group0)->getId()->thenReturn($this->idGroup0);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$group1 = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class GroupStrategyTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest->strategy
Open
$this->assertEquals(GroupInterface::ENTITY_TYPE, $this->strategy->getType());
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest->strategy
Open
$this->assertSame($isGranted, $this->strategy->canDelete($group, $parameters));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest::assertSame
Open
$this->assertSame($isGranted, $this->strategy->canDelete($group, $parameters));
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$group0 = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($group1)->getId()->thenReturn($this->idGroup1);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->userRepository)->getCountsUsersByGroups(array($this->idGroup0))->thenReturn(array($this->idGroup0 => 0));
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->userRepository)->getCountsUsersByGroups(array($this->idGroup1))->thenReturn(array($this->idGroup1 => 1));
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest->strategy
Open
), $this->strategy->getActions());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\GroupBundle\Tests\BusinessRules\Strategies\GroupStrategyTest::assertEquals
Open
$this->assertEquals(GroupInterface::ENTITY_TYPE, $this->strategy->getType());
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
Phake::when($this->userRepository)->getCountsUsersByGroups(array($this->idGroup1))->thenReturn(array($this->idGroup1 => 1));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
Phake::when($this->userRepository)->getCountsUsersByGroups(array($this->idGroup0))->thenReturn(array($this->idGroup0 => 0));
- Create a ticketCreate a ticket
- Exclude checks