Completed
Push — master ( 09510d...3d2d99 )
by Luke
02:13
created

ListingMethod::sendDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ZpgRtf\Methods;
4
5
use ZpgRtf\Objects\BranchObject;
6
use ZpgRtf\Objects\ListingObject;
7
8
/**
9
 * The listing method allows you to list, update or delete listings on the ZPG rtf.
10
 */
11
class ListingMethod extends AbstractMethod
12
{
13
    /** @var string */
14
    const UPDATE_SCHEMA = 'http://realtime-listings.webservices.zpg.co.uk/docs/v1.2/schemas/listing/update.json';
15
16
    /** @var string */
17
    const LIST_SCHEMA = 'http://realtime-listings.webservices.zpg.co.uk/docs/v1.2/schemas/listing/list.json';
18
19
    /** @var string */
20
    const DELETE_SCHEMA = 'http://realtime-listings.webservices.zpg.co.uk/docs/v1.2/schemas/listing/delete.json';
21
22
    /**
23
     * @return \GuzzleHttp\Psr7\Response
24
     */
25
    public function getList(BranchObject $branchObject)
26
    {
27
        return $this->validateAndSend(self::LIST_SCHEMA, 'listing/list', $branchObject);
0 ignored issues
show
Bug introduced by
The method validateAndSend() does not exist on ZpgRtf\Methods\ListingMethod. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        return $this->/** @scrutinizer ignore-call */ validateAndSend(self::LIST_SCHEMA, 'listing/list', $branchObject);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
    }
29
30
    /**
31
     * @return \GuzzleHttp\Psr7\Response
32
     */
33
    public function sendUpdate(ListingObject $listingObject)
34
    {
35
        return $this->validateAndSend(self::UPDATE_SCHEMA, 'listing/update', $listingObject);
36
    }
37
38
    /**
39
     * @return \GuzzleHttp\Psr7\Response
40
     */
41
    public function sendDelete(ListingDeleteObject $listingDeleteObject)
0 ignored issues
show
Bug introduced by
The type ZpgRtf\Methods\ListingDeleteObject 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...
42
    {
43
        return $this->validateAndSend(self::DELETE_SCHEMA, 'listing/delete', $listingDeleteObject);
44
    }
45
}
46