AbstractVoterTest
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractVoterTest extends AbstractBaseTestCase
{
protected $voter;
protected $perimeterManager;
- Create a ticketCreate a ticket
Method testVote
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testVote($object, $attribute, array $roles, $inPerimeter, $expectedVote)
- Create a ticketCreate a ticket
The method createPhakeNodeNotHydrated has a boolean flag argument $owner, which is a certain sign of a Single Responsibility Principle violation. Open
protected function createPhakeNodeNotHydrated($owner = false)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method createPhakeNode has a boolean flag argument $owner, which is a certain sign of a Single Responsibility Principle violation. Open
protected function createPhakeNode($owner = false)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method createPhakeContent has a boolean flag argument $owner, which is a certain sign of a Single Responsibility Principle violation. Open
protected function createPhakeContent($owner = false)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid using static access to class '\Phake' in method 'createPhakeTransition'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface');
- 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
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- 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 'createPhakeWorkflowProfile'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface');
- 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 'createPhakeContentType'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');
- 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 'testVote'. Open
Phake::when($this->perimeterManager)->isInPerimeter(Phake::anyParameters())->thenReturn($inPerimeter);
- 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 'createPhakeSite'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\SiteInterface');
- 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->perimeter = Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface');
- 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 'createPhakeApiClient'. Open
return Phake::mock('OpenOrchestra\BaseApi\Model\ApiClientInterface');
- 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->accessDecisionManager = Phake::mock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface');
- 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 'createPhakeLog'. Open
return Phake::mock('OpenOrchestra\LogBundle\Model\LogInterface');
- 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->group = 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 'createPhakeRedirection'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');
- 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
Phake::when($this->perimeter)->getItems(Phake::anyParameters())->thenReturn(array());
- 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->perimeterManager = Phake::mock('OpenOrchestra\Backoffice\Perimeter\PerimeterManager');
- 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 'createPhakeKeyword'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\KeywordInterface');
- 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 'createPhakeStatus'. Open
return 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 'createPhakeContent'. Open
$content = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentInterface');
- 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 'createPhakeGroup'. Open
$group = 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
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- 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->token = Phake::mock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
- 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 'testVote'. Open
Phake::when($this->accessDecisionManager)->decide(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 'setUp'. Open
$this->user = Phake::mock('OpenOrchestra\UserBundle\Model\UserInterface');
- 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 'createPhakeTrashItem'. Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\TrashItemInterface');
- 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 'createPhakeNode'. Open
$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
Avoid using static access to class '\Phake' in method 'setUp'. Open
Phake::when($this->group)->getPerimeter(Phake::anyParameters())->thenReturn($this->perimeter);
- 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 'createPhakeUser'. Open
$user = Phake::mock('OpenOrchestra\UserBundle\Model\UserInterface');
- 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->user)->getGroups()->thenReturn(array($this->group));
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeTrashItem()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeTrashItem()
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeRedirection()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeRedirection()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$group = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeWorkflowProfile()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeWorkflowProfile()
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->perimeterManager)->isInPerimeter(Phake::anyParameters())->thenReturn($inPerimeter);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeSite()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeSite()
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeUser()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeUser()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$user = Phake::mock('OpenOrchestra\UserBundle\Model\UserInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->perimeterManager = Phake::mock('OpenOrchestra\Backoffice\Perimeter\PerimeterManager');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->group)->getPerimeter(Phake::anyParameters())->thenReturn($this->perimeter);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->user)->getUsername()->thenReturn($this->username);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->token)->getUser()->thenReturn($this->user);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->accessDecisionManager = Phake::mock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->token)->getRoles()->thenReturn($roles);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeTransition()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeTransition()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\KeywordInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\AbstractVoterTest::assertEquals
Open
$this->assertEquals($expectedVote, $vote);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeNodeNotHydrated()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeNodeNotHydrated($owner = false)
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeStatus()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeStatus()
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->perimeter)->getItems(Phake::anyParameters())->thenReturn(array());
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->group)->getPerimeter(Phake::anyParameters())->thenReturn($this->perimeter);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->user = Phake::mock('OpenOrchestra\UserBundle\Model\UserInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\LogBundle\Model\LogInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($user)->getGroups()->thenReturn(array($group));
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeContentType()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeContentType()
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->accessDecisionManager)->decide(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->perimeter = Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->group = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->token = Phake::mock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->perimeterManager)->isInPerimeter(Phake::anyParameters())->thenReturn($inPerimeter);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeLog()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeLog()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeNode()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeNode($owner = false)
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($node)->getCreatedBy()->thenReturn($this->username);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeKeyword()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeKeyword()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\BaseApi\Model\ApiClientInterface');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
abstract class AbstractVoterTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->accessDecisionManager)->decide(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{createdBy:string,nodeId:'fakeNodeId',path:'fakePath'}|array{nodeId:'fakeNodeId',path:'fakePath'}
but createPhakeNodeNotHydrated()
is declared to return \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
return $node;
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($content)->getCreatedBy()->thenReturn($this->username);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeGroup()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeGroup()
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeApiClient()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeApiClient()
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$content = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\TrashItemInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->perimeter)->getItems(Phake::anyParameters())->thenReturn(array());
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
return Phake::mock('OpenOrchestra\ModelInterface\Model\SiteInterface');
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeContent()
is undeclared type \OpenOrchestra\Backoffice\Tests\Security\Authorization\Voter\Phake_IMock
Open
protected function createPhakeContent($owner = false)
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($group)->getSite()->thenReturn($site);
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $accessDecisionManager. Keep variable name length under 20. Open
protected $accessDecisionManager;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Line exceeds 120 characters; contains 164 characters Open
Phake::when($this->perimeterManager)->createPerimeter(Phake::anyParameters())->thenReturn(Phake::mock('OpenOrchestra\Backoffice\Model\PerimeterInterface'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
if (in_array(ContributionRoleInterface::PLATFORM_ADMIN, $roles) || in_array(ContributionRoleInterface::DEVELOPER, $roles)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
$this->accessDecisionManager = Phake::mock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface');
- Create a ticketCreate a ticket
- Exclude checks