open-orchestra/open-orchestra-cms-bundle

View on GitHub
GroupBundle/DataFixtures/MongoDB/LoadGroupData.php

Summary

Maintainability
A
0 mins
Test Coverage

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::getReference
Open

            $this->getReference('site2')->getSiteId()

Argument 2 (workflowProfileCollection) is \OpenOrchestra\ModelBundle\Document\WorkflowProfileCollection but \OpenOrchestra\GroupBundle\Document\Group::addWorkflowProfileCollection() takes \OpenOrchestra\ModelInterface\Model\WorkflowProfileCollectionInterface defined at /code/GroupBundle/Document/Group.php:159
Open

        $group->addWorkflowProfileCollection(NodeInterface::ENTITY_TYPE, $nodeProfileCollection);

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

        $group->addWorkflowProfileCollection(NodeInterface::ENTITY_TYPE, $nodeProfileCollection);

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

        $nodePerimeter = $this->createPerimeter(NodeInterface::ENTITY_TYPE, array(

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::getReference
Open

        $sadmin2->setSite($this->getReference('site2'));

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::addReference
Open

        $this->addReference('s-admin-demo', $sadmin2);

Call to method persist from undeclared class \Doctrine\Common\Persistence\ObjectManager
Open

        $manager->persist($groupDemo);

Call to undeclared method \OpenOrchestra\GroupBundle\Document\Group::addRole
Open

        $sadmin2->addRole(ContributionRoleInterface::SITE_ADMIN);

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::addReference
Open

        $this->addReference('group3', $group);

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::addReference
Open

        $this->addReference('group2', $groupDemo);

Call to method flush from undeclared class \Doctrine\Common\Persistence\ObjectManager
Open

        $manager->flush();

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::getReference
Open

        $group->setSite($this->getReference('site3'));

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\SiteInterface
Open

        $sitePerimeter = $this->createPerimeter(SiteInterface::ENTITY_TYPE, array(

Parameter $manager has undeclared type \Doctrine\Common\Persistence\ObjectManager
Open

    public function load(ObjectManager $manager)

Call to method persist from undeclared class \Doctrine\Common\Persistence\ObjectManager
Open

        $manager->persist($group);

Call to undeclared method \OpenOrchestra\GroupBundle\DataFixtures\MongoDB\LoadGroupData::getReference
Open

        $group->setSite($this->getReference('site2'));

Class implements undeclared interface \OpenOrchestra\ModelInterface\DataFixtures\OrchestraFunctionalFixturesInterface
Open

class LoadGroupData extends AbstractLoadGroupData implements OrchestraFunctionalFixturesInterface

Call to method persist from undeclared class \Doctrine\Common\Persistence\ObjectManager
Open

        $manager->persist($sadmin2);

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

        $nodeProfileCollection = $this->createProfileCollection(array('profile-Contributor'));

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

There are no issues that match your filters.

Category
Status