Avoid using static access to class '\Phake' in method 'testConfigureOptions'. Open
$resolverMock = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
- 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->keyword2 = 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 'setUp'. Open
$this->keyword1 = 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 'setUp'. Open
$this->keywordRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface');
- 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->conditionToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\ConditionToReferenceKeywordTransformer');
- 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->authorizationChecker)->isGranted(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->csvToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\CsvToReferenceKeywordTransformer');
- 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->builder = Phake::mock('Symfony\Component\Form\FormBuilder');
- 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->authorizationChecker = Phake::mock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
- 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 'testConfigureOptions'. Open
Phake::when($this->router)->generate(Phake::anyParameters())->thenReturn($route);
- 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->router = Phake::mock('Symfony\Component\Routing\RouterInterface');
- 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 add
from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open
$this->keywords->add($this->keyword1);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->keywordRepository)->findAll()->thenReturn($this->keywords);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->router)->generate(Phake::anyParameters())->thenReturn($route);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->conditionToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\ConditionToReferenceKeywordTransformer');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($this->builder)->addModelTransformer($this->csvToReferenceKeywordTransformer);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->builder = Phake::mock('Symfony\Component\Form\FormBuilder');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $options
has undeclared type \Symfony\Component\OptionsResolver\Options
Open
'attr' => function(Options $options) use ($isGranted, $tagLabel, $route) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->authorizationChecker = Phake::mock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->keyword2 = Phake::mock('OpenOrchestra\ModelInterface\Model\KeywordInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->csvToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\CsvToReferenceKeywordTransformer');
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->authorizationChecker)->isGranted(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Assigning \OpenOrchestra\Backoffice\Form\Type\Component\KeywordsChoiceType
to property but \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest->form
is \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest
Open
$this->form = new KeywordsChoiceType($this->csvToReferenceKeywordTransformer, $this->conditionToReferenceKeywordTransformer, $this->keywordRepository, $this->router, $this->authorizationChecker);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::assertSame
Open
$this->assertSame('oo_keywords_choice', $this->form->getName());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::assertSame
Open
$this->assertSame('text', $this->form->getParent());
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($resolverMock)->setDefaults(array(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::buildForm
Open
$this->form->buildForm($this->builder, array('is_condition' => true));
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Phake::verify($this->builder)->addModelTransformer($this->conditionToReferenceKeywordTransformer);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
class KeywordsChoiceTypeTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$resolverMock = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::getParent
(Did you mean expr->testParent()) Open
$this->assertSame('text', $this->form->getParent());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::configureOptions
Open
$this->form->configureOptions($resolverMock);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to \Symfony\Component\OptionsResolver\Options
Open
return array_replace($default, $options['new_attr']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->keyword1 = Phake::mock('OpenOrchestra\ModelInterface\Model\KeywordInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->keywordRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
$this->router = Phake::mock('Symfony\Component\Routing\RouterInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::buildForm
Open
$this->form->buildForm($this->builder, array('is_condition' => false));
- Create a ticketCreate a ticket
- Exclude checks
Call to method add
from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open
$this->keywords->add($this->keyword2);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->authorizationChecker)->isGranted(Phake::anyParameters())->thenReturn(true);
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open
$this->keywords = new ArrayCollection();
- Create a ticketCreate a ticket
- Exclude checks
Call to method anyParameters
from undeclared class \Phake
Open
Phake::when($this->router)->generate(Phake::anyParameters())->thenReturn($route);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\KeywordsChoiceTypeTest::getName
(Did you mean expr->testName()) Open
$this->assertSame('oo_keywords_choice', $this->form->getName());
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->keyword1)->getLabel()->thenReturn($tagLabel);
- Create a ticketCreate a ticket
- Exclude checks
Call to method when
from undeclared class \Phake
Open
Phake::when($this->keyword2)->getLabel()->thenReturn($tagLabel);
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $csvToReferenceKeywordTransformer. Keep variable name length under 20. Open
protected $csvToReferenceKeywordTransformer;
- 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
Avoid excessively long variable names like $keywordToDocumentManager. Keep variable name length under 20. Open
protected $keywordToDocumentManager;
- 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
Avoid excessively long variable names like $conditionToReferenceKeywordTransformer. Keep variable name length under 20. Open
protected $conditionToReferenceKeywordTransformer;
- 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
Expected 1 space after FUNCTION keyword; 0 found Open
'attr' => function(Options $options) use ($isGranted, $tagLabel, $route) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
$this->csvToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\CsvToReferenceKeywordTransformer');
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
$this->conditionToReferenceKeywordTransformer = Phake::mock('OpenOrchestra\Backoffice\Form\DataTransformer\ConditionToReferenceKeywordTransformer');
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$this->authorizationChecker = Phake::mock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 203 characters Open
$this->form = new KeywordsChoiceType($this->csvToReferenceKeywordTransformer, $this->conditionToReferenceKeywordTransformer, $this->keywordRepository, $this->router, $this->authorizationChecker);
- Create a ticketCreate a ticket
- Exclude checks