Issues (118)

findInternalRDVPointRetraitAcheminement.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\FindInternalRDVPointRetraitAcheminement;
0 ignored issues
show
The type ColissimoPickupPoint\Str...ointRetraitAcheminement 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->findInternalRDVPointRetraitAcheminement(new FindInternalRDVPointRetraitAcheminement(COLISSIMO_WS_CONTRACT_NUMBER, COLISSIMO_WS_PASSWORD, '13 Rue de la Fédération', '75015', 'Paris', 'FR', '2', date('d/m/Y')));
0 ignored issues
show
The method findInternalRDVPointRetraitAcheminement() 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 */ findInternalRDVPointRetraitAcheminement(new FindInternalRDVPointRetraitAcheminement(COLISSIMO_WS_CONTRACT_NUMBER, COLISSIMO_WS_PASSWORD, '13 Rue de la Fédération', '75015', 'Paris', 'FR', '2', date('d/m/Y')));

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\RdvPointRetraitAcheminementResult
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
    echo PHP_EOL . sprintf('<br />QualiteReponse: %s', $return->getQualiteReponse());
51
    echo PHP_EOL . sprintf('<br />WsRequestId: %s', $return->getWsRequestId());
52
    echo PHP_EOL . '<br />ListePointRetraitAcheminement';
53
    if ($return->getErrorCode() <= 0) {
54
        foreach ($return->getListePointRetraitAcheminement() as $index => $pointRetraitAcheminement) {
55
            echo PHP_EOL . "\t" . sprintf('<br />Point retrait #%d', $index);
56
            echo PHP_EOL . "\t\t" . sprintf('<br />Distance %dm', $pointRetraitAcheminement->getDistanceEnMetre());
57
            echo PHP_EOL . "\t\t" . sprintf('<br />Location %s, %s, %s, %s (%s)',
58
                $pointRetraitAcheminement->getNom(),
59
                $pointRetraitAcheminement->getAdresse1(),
60
                $pointRetraitAcheminement->getLocalite(),
61
                $pointRetraitAcheminement->getLibellePays(),
62
                $pointRetraitAcheminement->getIndiceDeLocalisation());
63
            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",
64
                $pointRetraitAcheminement->getHorairesOuvertureLundi(),
65
                $pointRetraitAcheminement->getHorairesOuvertureMardi(),
66
                $pointRetraitAcheminement->getHorairesOuvertureMercredi(),
67
                $pointRetraitAcheminement->getHorairesOuvertureJeudi(),
68
                $pointRetraitAcheminement->getHorairesOuvertureVendredi(),
69
                $pointRetraitAcheminement->getHorairesOuvertureSamedi(),
70
                $pointRetraitAcheminement->getHorairesOuvertureDimanche());
71
        }
72
    }
73
} else {
74
    echo PHP_EOL . 'An error occurred: ' . $find->getLastErrorForMethod('ColissimoPickupPoint\ServiceType\Find::findInternalRDVPointRetraitAcheminement')->getMessage() . PHP_EOL;
75
}
76