open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Tests/Manager/RouteDocumentManagerTest.php

Summary

Maintainability
C
1 day
Test Coverage

The class RouteDocumentManagerTest has 12 public methods. Consider refactoring RouteDocumentManagerTest to keep number of public methods under 10.
Open

class RouteDocumentManagerTest extends AbstractBaseTestCase
{
    /**
     * @var RouteDocumentManager
     */

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

File RouteDocumentManagerTest.php has 266 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace OpenOrchestra\Backoffice\Tests\Manager;

use Doctrine\Common\Collections\ArrayCollection;
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 2 hrs to fix

Method setUp has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function setUp()
    {
        $this->routeDocumentClass = 'OpenOrchestra\ModelBundle\Document\RouteDocument';

        $this->nodeRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 1 hr to fix

Method testCreateForNode has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateForNode($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method testCreateForSite has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateForSite($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method verifyNodeRoutes has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function verifyNodeRoutes($language, $id, array $aliasIds, $exceptedPattern, $routeDocuments, $nodeId)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method verifyRedirectionRoutes has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function verifyRedirectionRoutes(array $routeDocuments, $locale, $id, array $aliasIds, $mongoNodeId, $permanent)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method testCreateRedirectionToUrl has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateRedirectionToUrl($locale, $id, $aliasIds, $permanent, $pattern, $url)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method testcreateOrUpdateForRedirectionToNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testcreateOrUpdateForRedirectionToNode($locale, $id, $aliasIds, $permanent, $pattern)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Method testCreateForSiteWithRedirection has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateForSiteWithRedirection($locale, $id, $aliasIds, $permanent, $pattern)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Method generateNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function generateNode($language, $id, $pattern, $parentId, $nodeId)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Avoid using static access to class '\Phake' in method 'setUp'.
Open

        Phake::when($this->siteRepository)->findOneBySiteId(Phake::anyParameters())->thenReturn($this->site);

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 'testCreateForNode'.
Open

        $children = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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 'testCreateForSiteWithRedirection'.
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array());

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 'testcreateOrUpdateForRedirectionToNode'.
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

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 'testCreateForSiteWithRedirection'.
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array($redirection));

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 'testClearForNode'.
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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 'testDeleteForRedirection'.
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

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 'testCreateForSiteWithRedirection'.
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en', 'fr', 'de'));

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->siteAliasEn = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');

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 'testCreateForSiteWithRedirection'.
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

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 'testcreateOrUpdateForRedirectionToNode'.
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

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->siteRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface');

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 'testCreateForSiteWithRedirection'.
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

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->site = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteInterface');

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 'testCreateForNode'.
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

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 'testCreateForNodeWithNoPublishedNode'.
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

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->nodeRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');

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 'testCreateRedirectionToUrl'.
Open

        Phake::verify($this->nodeRepository, Phake::never())->findOnePublished(Phake::anyParameters());

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 'testCreateForSiteWithRedirection'.
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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 'testCreateForNodeWithNoPublishedNode'.
Open

        Phake::when($this->nodeRepository)->findPublishedByPathAndLanguage(Phake::anyParameters())->thenReturn(array());

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->redirectionRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RedirectionRepositoryInterface');

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 'testCreateForSite'.
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array());

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 'testCreateForNodeWithNoPublishedNode'.
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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->siteAliasFr = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');

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 'testCreateForSite'.
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en'));

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 'testClearForNode'.
Open

        Phake::when($this->nodeRepository)->findNodeIdByIncludedPathSiteIdAndLanguage(Phake::anyParameters())->thenReturn(array($nodeId, $childrenId));

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 'testcreateOrUpdateForRedirectionToNode'.
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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 'testCreateForSiteWithRedirection'.
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

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 'testCreateForSite'.
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array($node));

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 'testCreateForSite'.
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

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 'testCreateRedirectionToUrl'.
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

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 'testCreateRedirectionToUrl'.
Open

        Phake::verify($this->nodeRepository, Phake::never())->findOnePublished(Phake::anyParameters());

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 'generateNode'.
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

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->routeDocumentRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RouteDocumentRepositoryInterface');

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->siteAliasEn = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasEn)->getLanguage()->thenReturn('en');

Call to method mock from undeclared class \Phake
Open

        $this->siteRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface');

Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open

class RouteDocumentManagerTest extends AbstractBaseTestCase

Reference to constant SCHEME_HTTPS from undeclared class \OpenOrchestra\ModelInterface\Model\ReadSchemeableInterface
Open

        Phake::when($this->siteAliasFr)->getScheme()->thenReturn(ReadSchemeableInterface::SCHEME_HTTPS);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasEn)->getScheme()->thenReturn(ReadSchemeableInterface::SCHEME_HTTPS);

Call to method __construct from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open

        $siteAliases = new ArrayCollection(array(

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array($node));

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getRoutePattern()->thenReturn($pattern);

Call to method mock from undeclared class \Phake
Open

        $this->redirectionRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RedirectionRepositoryInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasEn)->getDomain()->thenReturn($this->domainEn);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByPathAndLanguage($node->getPath(), $this->siteId, $language)->thenReturn(array($node, $children));

Reference to constant ROOT_NODE_ID from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open

            array('en', 'nodeId', array(0, 2), '/foo', '/foo', NodeInterface::ROOT_NODE_ID),

Reference to constant SCHEME_HTTPS from undeclared class \OpenOrchestra\ModelInterface\Model\ReadSchemeableInterface
Open

        Phake::when($this->siteAliasEn)->getScheme()->thenReturn(ReadSchemeableInterface::SCHEME_HTTPS);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->nodeRepository, Phake::never())->findOnePublished(Phake::anyParameters());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en'));

Reference to constant ROOT_NODE_ID from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open

            array('en', 'nodeId', array(0, 2), 'foo', '/bar/foo', NodeInterface::ROOT_NODE_ID),

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasFr)->getDomain()->thenReturn($this->domainFr);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getId()->thenReturn($mongoNodeId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->isPermanent()->thenReturn($permanent);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getLocale()->thenReturn($locale);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($nodeId, $route->getNodeId());

Call to method mock from undeclared class \Phake
Open

        $this->siteAliasFr = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($children)->getNodeId()->thenReturn($childrenId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getLocale()->thenReturn($locale);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->nodeRepository)->findOnePublished($nodeId, $locale, $siteId);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findNodeIdByIncludedPathSiteIdAndLanguage(Phake::anyParameters())->thenReturn(array($nodeId, $childrenId));

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertCount
Open

        $this->assertCount(2, $routeDocuments);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertCount
Open

        $this->assertCount(2, $routeDocuments);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($this->{'domain'. ucfirst($locale)}, $route->getHost());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteRepository)->findOneBySiteId(Phake::anyParameters())->thenReturn($this->site);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en'));

Call to method when from undeclared class \Phake
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array($redirection));

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

        $this->assertSame(array(), $routes);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->isPermanent()->thenReturn($permanent);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($this->siteId, $route->getSiteId());

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($exceptedPattern, $route->getPattern());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->site)->getAliases()->thenReturn($siteAliases);

Call to method mock from undeclared class \Phake
Open

        $children = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to method mock from undeclared class \Phake
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to method mock from undeclared class \Phake
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->isPermanent()->thenReturn($permanent);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame(array(

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasFr)->getLanguage()->thenReturn('fr');

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasFr)->getScheme()->thenReturn(ReadSchemeableInterface::SCHEME_HTTPS);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->siteAliasFr)->getPrefix()->thenReturn('prefixFr');

Call to method mock from undeclared class \Phake
Open

        $this->site = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteInterface');

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array(

Call to method when from undeclared class \Phake
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

Argument 6 (permanent) is bool but \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::verifyRedirectionRoutes() takes string defined at /code/Backoffice/Tests/Manager/RouteDocumentManagerTest.php:402
Open

        $this->verifyRedirectionRoutes($routeDocuments, $locale, $id, $aliasIds, $mongoNodeId, $permanent);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getId()->thenReturn($id);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getRoutePattern()->thenReturn($pattern);

Call to method mock from undeclared class \Phake
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame(ReadSchemeableInterface::SCHEME_HTTPS, $route->getSchemes());

Reference to constant ROOT_NODE_ID from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open

            array('fr', 'nodeId', array(1, 3), 'foo', '/prefixFr/bar/foo', NodeInterface::ROOT_NODE_ID),

Call to method mock from undeclared class \Phake
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getNodeId()->thenReturn($nodeId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getSiteId()->thenReturn($siteId);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en', 'fr', 'de'));

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->nodeRepository)->findOnePublished($nodeId, $locale, $siteId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getLocale()->thenReturn($locale);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getLanguage()->thenReturn($language);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getSiteId()->thenReturn($siteId);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getLanguage()->thenReturn($language);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->routeDocumentRepository)->removeByNodeIdsSiteIdAndLanguage(array($nodeId, $childrenId), $siteId, $language);

Call to method mock from undeclared class \Phake
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->nodeRepository, Phake::never())->findOnePublished(Phake::anyParameters());

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getPath()->thenReturn('/' . $nodeId);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($aliasIds[$key] . '_' . $id, $route->getName());

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($this->{'domain' . ucfirst($language)}, $route->getHost());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->siteRepository)->findOneBySiteId(Phake::anyParameters())->thenReturn($this->site);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getId()->thenReturn($id);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array($redirection));

Call to method mock from undeclared class \Phake
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getSiteId()->thenReturn($siteId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getId()->thenReturn($id);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getSiteId()->thenReturn($this->siteId);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($aliasIds[$key] . '_' . $id, $route->getName());

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame(array(

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->siteRepository)->findOneBySiteId($this->siteId);

Reference to constant ROOT_NODE_ID from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open

            array('fr', 'nodeId', array(1, 3), '/foo', '/prefixFr/foo', NodeInterface::ROOT_NODE_ID),

Call to method mock from undeclared class \Phake
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->site)->getLanguages(Phake::anyParameters())->thenReturn(array('en', 'fr', 'de'));

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByPathAndLanguage(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getId()->thenReturn($id);

Call to method mock from undeclared class \Phake
Open

        $this->nodeRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($this->site)->getSiteId()->thenReturn($this->siteId);

Call to method mock from undeclared class \Phake
Open

        $node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getRoutePattern()->thenReturn($pattern);

Argument 6 (permanent) is bool but \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::verifyRedirectionRoutes() takes string defined at /code/Backoffice/Tests/Manager/RouteDocumentManagerTest.php:402
Open

        $this->verifyRedirectionRoutes($routeDocuments, $locale, $id, $aliasIds, $mongoNodeId, $permanent);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getId()->thenReturn($id);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getNodeId()->thenReturn($nodeId);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($aliasIds[$key] . '_' . $id, $route->getName());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findOnePublished(Phake::anyParameters())->thenReturn($node);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByPathAndLanguage(Phake::anyParameters())->thenReturn(array());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findNodeIdByIncludedPathSiteIdAndLanguage(Phake::anyParameters())->thenReturn(array($nodeId, $childrenId));

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getNodeId()->thenReturn($nodeId);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->siteRepository)->findOneBySiteId($siteId);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($this->{'domain'. ucfirst($locale)}, $route->getHost());

Call to method mock from undeclared class \Phake
Open

        $this->routeDocumentRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RouteDocumentRepositoryInterface');

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array($node));

Call to method when from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getSiteId()->thenReturn($siteId);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getParentId()->thenReturn($parentId);

Reference to constant SCHEME_HTTPS from undeclared class \OpenOrchestra\ModelInterface\Model\ReadSchemeableInterface
Open

            $this->assertSame(ReadSchemeableInterface::SCHEME_HTTPS, $route->getSchemes());

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame(array(

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getNodeId()->thenReturn($nodeId);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->routeDocumentRepository)->removeBySiteId($this->siteId);

Call to method mock from undeclared class \Phake
Open

        $redirection = Phake::mock('OpenOrchestra\ModelInterface\Model\RedirectionInterface');

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertSame
Open

            $this->assertSame($language, $route->getLanguage());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findAllRoutePattern(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getId()->thenReturn($mongoNodeId);

Call to method when from undeclared class \Phake
Open

        Phake::when($redirection)->getUrl()->thenReturn($url);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Manager\RouteDocumentManagerTest::assertCount
Open

        $this->assertCount(2, $routeDocuments);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array());

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getNodeId()->thenReturn($nodeId);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getSiteId()->thenReturn($siteId);

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->routeDocumentRepository)->removeByRedirectionId($id);

Call to method when from undeclared class \Phake
Open

        Phake::when($node)->getRoutePattern()->thenReturn($pattern);

Call to method never from undeclared class \Phake
Open

        Phake::verify($this->nodeRepository, Phake::never())->findOnePublished(Phake::anyParameters());

Avoid excessively long variable names like $routeDocumentRepository. Keep variable name length under 20.
Open

    protected $routeDocumentRepository;

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 $redirectionRepository. Keep variable name length under 20.
Open

    protected $redirectionRepository;

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 variables with short names like $id. Configured minimum length is 3.
Open

    public function testCreateForSiteWithRedirection($locale, $id, $aliasIds, $permanent, $pattern)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    protected function verifyNodeRoutes($language, $id, array $aliasIds, $exceptedPattern, $routeDocuments, $nodeId)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function testcreateOrUpdateForRedirectionToNode($locale, $id, $aliasIds, $permanent, $pattern)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

        $id = 'fakeId';

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function testCreateForSite($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    protected function generateNode($language, $id, $pattern, $parentId, $nodeId)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    protected function verifyRedirectionRoutes(array $routeDocuments, $locale, $id, array $aliasIds, $mongoNodeId, $permanent)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function testCreateRedirectionToUrl($locale, $id, $aliasIds, $permanent, $pattern, $url)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function testCreateForNode($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Each PHP statement must be on a line by itself
Open

        $this->manager->deleteForRedirection($redirection);;

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Line exceeds 120 characters; contains 127 characters
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array($node));

Line exceeds 120 characters; contains 129 characters
Open

        $this->routeDocumentRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RouteDocumentRepositoryInterface');

Line exceeds 120 characters; contains 151 characters
Open

        Phake::when($this->nodeRepository)->findNodeIdByIncludedPathSiteIdAndLanguage(Phake::anyParameters())->thenReturn(array($nodeId, $childrenId));

Line exceeds 120 characters; contains 121 characters
Open

        Phake::when($this->redirectionRepository)->findBySiteId(Phake::anyParameters())->thenReturn(array($redirection));

Line exceeds 120 characters; contains 125 characters
Open

        $this->redirectionRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\RedirectionRepositoryInterface');

Line exceeds 120 characters; contains 156 characters
Open

        Phake::when($this->nodeRepository)->findPublishedByPathAndLanguage($node->getPath(), $this->siteId, $language)->thenReturn(array($node, $children));

Line exceeds 120 characters; contains 122 characters
Open

        Phake::when($this->nodeRepository)->findPublishedByLanguageAndSiteId(Phake::anyParameters())->thenReturn(array());

Line exceeds 120 characters; contains 126 characters
Open

    protected function verifyRedirectionRoutes(array $routeDocuments, $locale, $id, array $aliasIds, $mongoNodeId, $permanent)

Line exceeds 120 characters; contains 137 characters
Open

        Phake::verify($this->routeDocumentRepository)->removeByNodeIdsSiteIdAndLanguage(array($nodeId, $childrenId), $siteId, $language);

There are no issues that match your filters.

Category
Status