Method checkRemoveReferencesToEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function checkRemoveReferencesToEntity($entity, $entityId, array $usedItems, $entityType, $itemRepository)
- Create a ticketCreate a ticket
Method checkAddReferencesToEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function checkAddReferencesToEntity($entity, $entityId, array $usedItems, $entityType, $itemRepository)
- Create a ticketCreate a ticket
Avoid using static access to class '\Phake' in method 'checkRemoveReferencesToEntity'. Open
Phake::when($itemRepository)->findByUsedInEntity(Phake::anyParameters())->thenReturn($usedItems);
- 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 'createPhakeContentAttribute'. Open
$attribute = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentAttributeInterface');
- 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
$keyword = 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 'createPhakeContentType'. Open
$contentType = 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 '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 'createPhakeBlock'. Open
$block = Phake::mock('OpenOrchestra\ModelInterface\Model\BlockInterface');
- 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($itemRepository)->findByUsedInEntity(Phake::anyParameters())->thenReturn($usedItems);
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open
Phake::when($content)->getAttributes()->thenReturn(new ArrayCollection($attributes));
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeNode()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeNode($nodeId = 'nodeId')
- 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 when
from undeclared class \Phake
Open
Phake::when($itemRepository)->findByUsedInEntity(Phake::anyParameters())->thenReturn($usedItems);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Reference\Strategies\AbstractReferenceStrategyTest::assertSame
Open
$this->assertSame($isSupported, $support);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeContent()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeContent($contentId = 'contentId', array $attributes = array())
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($content)->getId()->thenReturn($contentId);
- 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 when
from undeclared class \Phake
Open
Phake::when($itemRepository)->find($itemId)->thenReturn($item);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($content)->getAttributes()->thenReturn(new ArrayCollection($attributes));
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($item)->addUseInEntity($entityId, $entityType);
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($item)->removeUseInEntity($entityId, $entityType);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
abstract class AbstractReferenceStrategyTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeContentAttribute()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeContentAttribute($value = '', $type = '')
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$attribute = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentAttributeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($node)->getId()->thenReturn($nodeId);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeBlock()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeBlock($blockId = 'blockId')
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$contentType = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($contentType)->getContentTypeId()->thenReturn($contentTypeId);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeContentType()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeContentType($contentTypeId = 'contentTypeId')
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($attribute)->getType()->thenReturn($type);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($attribute)->getValue()->thenReturn($value);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($block)->getId()->thenReturn($blockId);
- Create a ticketCreate a ticket
- Exclude checks
Return type of createPhakeKeyword()
is undeclared type \OpenOrchestra\Backoffice\Tests\Reference\Strategies\Phake_IMock
Open
protected function createPhakeKeyword($keywordId = 'keywordId')
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$block = Phake::mock('OpenOrchestra\ModelInterface\Model\BlockInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($keyword)->getId()->thenReturn($keywordId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$keyword = Phake::mock('OpenOrchestra\ModelInterface\Model\KeywordInterface');
- Create a ticketCreate a ticket
- Exclude checks
Visibility must be declared on method "testAddReferencesToEntity" Open
abstract function testAddReferencesToEntity($entity, $entityId, array $usedItems);
- Create a ticketCreate a ticket
- Exclude checks
Visibility must be declared on method "testRemoveReferencesToEntity" Open
abstract function testRemoveReferencesToEntity($entity, $entityId, array $usedItems);
- Create a ticketCreate a ticket
- Exclude checks