Issues (118)

findInternalRDVPointRetraitAcheminementByID.php (4 issues)

1
<?php
2
/**
3
 * Composer autoload
4
 */
5
require_once __DIR__ . '/../vendor/autoload.php';
6
require_once __DIR__ . '/settings.inc.php';
7
/**
8
 * Used classes
9
 */
10
use WsdlToPhp\PackageBase\AbstractSoapClientBase;
11
use ColissimoPickupPoint\ClassMap;
12
use ColissimoPickupPoint\ServiceType\Find;
13
use ColissimoPickupPoint\StructType\FindInternalRDVPointRetraitAcheminementByID;
0 ignored issues
show
The type ColissimoPickupPoint\Str...RetraitAcheminementByID 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...
14
15
/**
16
 * Minimal options
17
 */
18
$options = array(
19
    AbstractSoapClientBase::WSDL_URL => 'https://ws.colissimo.fr/pointretrait-ws-cxf/PointRetraitServiceWS/2.0?wsdl',
20
    AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get()
21
);
22
/**
23
 * Samples for Find ServiceType
24
 */
25
$find = new Find($options);
26
/**
27
 * Send the request
28
 */
29
$result = $find->findInternalRDVPointRetraitAcheminementByID(new FindInternalRDVPointRetraitAcheminementByID(COLISSIMO_WS_CONTRACT_NUMBER, COLISSIMO_WS_PASSWORD, '097297', 'R01', 'FR', date('d/m/Y'), '2'));
0 ignored issues
show
The method findInternalRDVPointRetraitAcheminementByID() does not exist on ColissimoPickupPoint\ServiceType\Find. ( Ignorable by Annotation )

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

29
$result = $find->/** @scrutinizer ignore-call */ findInternalRDVPointRetraitAcheminementByID(new FindInternalRDVPointRetraitAcheminementByID(COLISSIMO_WS_CONTRACT_NUMBER, COLISSIMO_WS_PASSWORD, '097297', 'R01', 'FR', date('d/m/Y'), '2'));

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...
30
/**
31
 * Debug informations provided by the utility methods
32
 */
33
if (true) {
34
    echo 'XML Request: ' . $find->getLastRequest() . "\r\n";
35
    echo 'Headers Request: ' . $find->getLastRequestHeaders() . "\r\n";
0 ignored issues
show
Are you sure $find->getLastRequestHeaders() of type null|string[] can be used in concatenation? ( Ignorable by Annotation )

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

35
    echo 'Headers Request: ' . /** @scrutinizer ignore-type */ $find->getLastRequestHeaders() . "\r\n";
Loading history...
36
    echo 'XML Response: ' . $find->getLastResponse() . "\r\n";
37
    echo 'Headers Response: ' . $find->getLastResponseHeaders() . "\r\n";
0 ignored issues
show
Are you sure $find->getLastResponseHeaders() of type null|string[] can be used in concatenation? ( Ignorable by Annotation )

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

37
    echo 'Headers Response: ' . /** @scrutinizer ignore-type */ $find->getLastResponseHeaders() . "\r\n";
Loading history...
38
}
39
/**
40
 * Sample call for getProductInter operation/method
41
 */
42
if ($result !== false) {
43
    /**
44
     * @var ColissimoPickupPoint\StructType\RdvPointRetraitAcheminementByIDResult
45
     */
46
    $return = $result->getReturn();
47
    echo PHP_EOL . sprintf('<br />ErrorCode: %s', $return->getErrorCode());
48
    echo PHP_EOL . sprintf('<br />ErrorMessage: %s', $return->getErrorMessage());
49
    echo PHP_EOL . sprintf('<br />Rdv: %s', $return->getRdv());
50
    if ($return->getErrorCode() <= 0) {
51
        $pointRetraitAcheminement = $return->getPointRetraitAcheminement();
52
        echo PHP_EOL . "\t\t" . sprintf('<br />Distance %dm', $pointRetraitAcheminement->getDistanceEnMetre());
53
        echo PHP_EOL . "\t\t" . sprintf('<br />Location %s, %s, %s, %s (%s)',
54
            $pointRetraitAcheminement->getNom(),
55
            $pointRetraitAcheminement->getAdresse1(),
56
            $pointRetraitAcheminement->getLocalite(),
57
            $pointRetraitAcheminement->getLibellePays(),
58
            $pointRetraitAcheminement->getIndiceDeLocalisation());
59
        echo PHP_EOL . "\t\t" . sprintf("<br />Open hours \r\n\t\t\t<br />Monday: %s, \r\n\t\t\t<br />Tuesday: %s, \r\n\t\t\t<br />Wednesday: %s, \r\n\t\t\t<br />Thursday: %s \r\n\t\t\t<br />Friday: %s, \r\n\t\t\t<br />Saturday: %s, \r\n\t\t\t<br />Sunday: %s",
60
            $pointRetraitAcheminement->getHorairesOuvertureLundi(),
61
            $pointRetraitAcheminement->getHorairesOuvertureMardi(),
62
            $pointRetraitAcheminement->getHorairesOuvertureMercredi(),
63
            $pointRetraitAcheminement->getHorairesOuvertureJeudi(),
64
            $pointRetraitAcheminement->getHorairesOuvertureVendredi(),
65
            $pointRetraitAcheminement->getHorairesOuvertureSamedi(),
66
            $pointRetraitAcheminement->getHorairesOuvertureDimanche());
67
    }
68
} else {
69
    echo PHP_EOL . 'An error occurred: ' . $find->getLastErrorForMethod('ColissimoPickupPoint\ServiceType\Find::findInternalRDVPointRetraitAcheminementByID')->getMessage() . PHP_EOL;
70
}
71