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

AccountRepository::findById()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Guillermoandrae\Highrise\Repositories;
4
5
use BadMethodCallException;
6
use Guillermoandrae\Common\CollectionInterface;
7
use Guillermoandrae\Highrise\Models\ModelInterface;
8
use Guillermoandrae\Models\ModelInterface as BaseModelInterface;
9
use Guillermoandrae\Repositories\ReadOnlyRepositoryTrait;
10
11
class AccountRepository 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...
12
{
13
    use UnsearchableRepositoryTrait, ReadOnlyRepositoryTrait {
14
        UnsearchableRepositoryTrait::callUnsupportedMethod insteadof ReadOnlyRepositoryTrait;
15
    }
16
17
    protected $name = 'account';
18
19
    /**
20
     * Returns account information.
21
     *
22
     * @return ModelInterface
23
     */
24
    public function show(): ModelInterface
25
    {
26
        $result = $this->getAdapter()->request('GET', '/account.xml');
27
        return $this->hydrate($result);
28
    }
29
30
    public function findById($id): BaseModelInterface
31
    {
32
        return $this->callUnsupportedMethod('findById');
33
    }
34
35
    public function findAll(int $offset = 0, int $limit = null): CollectionInterface
36
    {
37
        return $this->callUnsupportedMethod('findAll');
38
    }
39
}
40