Backoffice/Tests/Form/DataTransformer/BBcodeToHtmlTransformerTest.php
Avoid using static access to class '\Phake' in method 'setUp'. Open
Open
$this->parser = Phake::mock('OpenOrchestra\BBcodeBundle\Parser\BBcodeParser');
- 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 unused local variables such as '$html'. Open
Open
$html = $this->transformer->transform($this->html);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Call to method verify
from undeclared class \Phake
Open
Open
Phake::verify($this->parser)->parse($this->html);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\DataTransformer\BBcodeToHtmlTransformerTest::assertSame
Open
Open
$this->assertSame($this->html, $bbcode);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
Open
class BBcodeToHtmlTransformerTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$this->parser = Phake::mock('OpenOrchestra\BBcodeBundle\Parser\BBcodeParser');
- Create a ticketCreate a ticket
- Exclude checks
Call to method verify
from undeclared class \Phake
Open
Open
Phake::verify($this->parser)->getAsPreviewHTML();
- Create a ticketCreate a ticket
- Exclude checks