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

DealsRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateStatus() 0 6 1
1
<?php
2
3
namespace Guillermoandrae\Highrise\Repositories;
4
5
use Guillermoandrae\Highrise\Models\ModelInterface;
6
7
class DealsRepository 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
    use UnsearchableRepositoryTrait;
10
11
    public function updateStatus($id, $status): ModelInterface
12
    {
13
        $uri = sprintf('/%s/%s/status.xml?reload=true', $this->getName(), $id);
14
        $body = sprintf('<status><name>%s</name></status>', $status);
15
        $results = $this->getAdapter()->request('PUT', $uri, ['body' => $body]);
16
        return $this->hydrate($results);
17
    }
18
}
19