ernestwisniewski/kbin

View on GitHub
src/Repository/SearchRepository.php

Summary

Maintainability
B
5 hrs
Test Coverage

Method findByApId has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function findByApId($url): array
    {
        // @todo union adapter
        $conn = $this->entityManager->getConnection();
        $sql = "
Severity: Minor
Found in src/Repository/SearchRepository.php - About 1 hr to fix

    Method findBoosts has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function findBoosts(int $page, User $user): PagerfantaInterface
        {
            // @todo union adapter
            $conn = $this->entityManager->getConnection();
            $sql = "
    Severity: Minor
    Found in src/Repository/SearchRepository.php - About 1 hr to fix

      Method search has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function search($query, int $page = 1): PagerfantaInterface
          {
              // @todo union adapter
              $conn = $this->entityManager->getConnection();
              $sql = "
      Severity: Minor
      Found in src/Repository/SearchRepository.php - About 1 hr to fix

        Method buildResult has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function buildResult(array $result, $page, $countAll)
            {
                $entries = $this->entityManager->getRepository(Entry::class)->findBy(
                    ['id' => $this->getOverviewIds((array) $result, 'entry')]
                );
        Severity: Minor
        Found in src/Repository/SearchRepository.php - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status