Completed
Push — master ( 686ecf...037cc5 )
by Guillermo A.
09:28
created

AbstractRelationalRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A findBy() 0 5 1
1
<?php
2
3
namespace Guillermoandrae\Highrise\Repositories;
4
5
use Guillermoandrae\Common\CollectionInterface;
6
7
abstract class AbstractRelationalRepository extends AbstractRepository
0 ignored issues
show
Bug introduced by
The type Guillermoandrae\Highrise...ries\AbstractRepository was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
{
9
    /**
10
     * Returns all upcoming tasks assigned to the authenticated user related to
11
     * a person, company, case, or deal.
12
     *
13
     * @param string $name The name of the resource for which tasks should be
14
     *                     returned.
15
     * @param mixed $id The resource ID.
16
     * @param array $filters  The request filters.
17
     * @return CollectionInterface
18
     */
19
    public function findBy(string $name, $id, array $filters = []): CollectionInterface
20
    {
21
        $uri = sprintf('/%s/%s/%s.xml', $name, $id, $this->getName());
22
        $results = $this->getAdapter()->request('GET', $uri, ['query' => $filters]);
23
        return $this->hydrate($results);
24
    }
25
}
26