Failed Conditions
Push — master ( 2fcedf...efe7fa )
by Guillermo A.
01:42
created

Account   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 27
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A find() 0 4 1
A findAll() 0 4 1
A show() 0 3 1
1
<?php
2
3
namespace Guillermoandrae\Highrise\Resources;
4
5
use BadMethodCallException;
6
use Guillermoandrae\Common\CollectionInterface;
7
8
class Account extends AbstractResource
9
{
10
    use UnsearchableResourceTrait, ReadOnlyResourceTrait;
11
12
    protected $name = 'account';
13
14
    /**
15
     * Returns account information.
16 1
     *
17
     * @return array
18 1
     */
19 1
    public function show(): array
20
    {
21
        return $this->getAdapter()->request('GET', '/account.xml');
22 1
    }
23
24 1
    public function find($id): array
25
    {
26
        throw new BadMethodCallException(
27 1
            'The find method of this resource is not supported.'
28
        );
29 1
    }
30
31
    public function findAll(array $options = []): CollectionInterface
32 1
    {
33
        throw new BadMethodCallException(
34 1
            'The findAll method of this resource is not supported.'
35
        );
36
    }
37
}
38