open-orchestra/open-orchestra-cms-bundle

View on GitHub
GroupBundle/Repository/GroupRepository.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '65', column '61').
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '144', column '50').
Open

            $filter['labels.' . $language] = new \MongoRegex('/.*'.$label.'.*/i');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '166', column '45').
Open

            ->field('site.$id')->equals(new \MongoId($siteId))

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '124', column '34').
Open

            $siteIds[$key] = new \MongoId($siteId);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '194', column '45').
Open

            ->field('site.$id')->equals(new \MongoId($siteId))

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '148', column '39').
Open

            $filter['site.$id'] = new \MongoId($siteId);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Call to method getSkip from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $qa->skip($configuration->getSkip());
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Parameter $site has undeclared type \OpenOrchestra\ModelInterface\Model\SiteInterface
Open

    public function softDeleteGroupsBySite(SiteInterface $site)

Call to method getSearchIndex from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $language = $configuration->getSearchIndex('language');
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method __construct from undeclared class \MongoRegex
Open

            $filter['labels.' . $language] = new \MongoRegex('/.*'.$label.'.*/i');
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::hydrateAggregateQuery
Open

        return $this->hydrateAggregateQuery($qa);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

@throws type of removeGroups has undeclared type \Doctrine\ODM\MongoDB\MongoDBException
Open

    public function removeGroups(array $groupIds)

@throws type of softDeleteGroupsBySite has undeclared type \Doctrine\ODM\MongoDB\MongoDBException
Open

    public function softDeleteGroupsBySite(SiteInterface $site)

Call to method getSearchIndex from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $label = $configuration->getSearchIndex('label');
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::createQueryBuilder
Open

        $this->createQueryBuilder()
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method limit from undeclared class \Solution\MongoAggregation\Pipeline\Stage
Open

        $qa->limit($configuration->getLimit());
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Parameter $configuration has undeclared type \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

    public function countWithFilter(PaginateFinderConfiguration $configuration, array $siteIds)

Call to method sort from undeclared class \Solution\MongoAggregation\Pipeline\Stage
Open

            $qa->sort($order);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method getSearchIndex from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $siteId = $configuration->getSearchIndex('site');
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Parameter $configuration has undeclared type \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

    public function findForPaginate(PaginateFinderConfiguration $configuration, array $siteIds)

Call to method skip from undeclared class \Solution\MongoAggregation\Pipeline\Stage
Open

        $qa->skip($configuration->getSkip());
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Parameter $configuration has undeclared type \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

    protected function createQueryWithFilter(

Call to method match from undeclared class \Solution\MongoAggregation\Pipeline\Stage
Open

            $qa->match($filters);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method __construct from undeclared class \MongoId
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::createAggregationQuery
Open

        $qa = $this->createAggregationQuery();
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method getLimit from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $qa->limit($configuration->getLimit());
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::countDocumentAggregateQuery
Open

        return $this->countDocumentAggregateQuery($qa);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::createQueryBuilder
Open

        $this->createQueryBuilder()
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method getOrder from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $order = $configuration->getOrder();
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Return type of createAggregationQueryBuilderWithSiteIds() is undeclared type \Solution\MongoAggregation\Pipeline\Stage
Open

    protected function createAggregationQueryBuilderWithSiteIds(array $siteIds)

Return type of createQueryWithFilter() is undeclared type \Solution\MongoAggregation\Pipeline\Stage
Open

    protected function createQueryWithFilter(

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::createQueryBuilder
Open

        $this->createQueryBuilder()
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Class extends undeclared class \OpenOrchestra\Repository\AbstractAggregateRepository
Open

class GroupRepository extends AbstractAggregateRepository implements GroupRepositoryInterface
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::countDocumentAggregateQuery
Open

        return $this->countDocumentAggregateQuery($qa);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method __construct from undeclared class \MongoId
Open

            ->field('site.$id')->equals(new \MongoId($siteId))
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Parameter $configuration has undeclared type \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

    protected function getFilterSearch(PaginateFinderConfiguration $configuration) {

Call to method __construct from undeclared class \MongoId
Open

            $filter['site.$id'] = new \MongoId($siteId);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to undeclared method \OpenOrchestra\GroupBundle\Repository\GroupRepository::createQueryBuilder
Open

        $this->createQueryBuilder()
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method __construct from undeclared class \MongoId
Open

            ->field('site.$id')->equals(new \MongoId($siteId))
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

Call to method __construct from undeclared class \MongoId
Open

            $siteIds[$key] = new \MongoId($siteId);
Severity: Critical
Found in GroupBundle/Repository/GroupRepository.php by phan

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

        $qa = $this->createAggregationQueryBuilderWithSiteIds($siteIds);

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 $qa. Configured minimum length is 3.
Open

        $qa = $this->createAggregationQueryBuilderWithSiteIds($siteIds);

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 $qa. Configured minimum length is 3.
Open

        $qa = $this->createQueryWithFilter($configuration, $siteIds);

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 $qa. Configured minimum length is 3.
Open

        $qa = $this->createAggregationQuery();

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 $qa. Configured minimum length is 3.
Open

        $qa = $this->createQueryWithFilter($configuration, $siteIds, $order);

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

Expected 1 space after FUNCTION keyword; 0 found
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

Each PHP statement must be on a line by itself
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

Expected 0 spaces before closing bracket; 1 found
Open

        if (null !== $label && $label !== '' && null !== $language && $language !== '' ) {

Opening brace must be the last content on the line
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

Closing brace must be on a line by itself
Open

        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

Opening brace should be on a new line
Open

    protected function getFilterSearch(PaginateFinderConfiguration $configuration) {

There are no issues that match your filters.

Category
Status