GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( fe4962...3aa77f )
by Thijs
04:04
created

SoapAdapter::getClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace WebservicesNl\Connector\ProtocolAdapter;
4
5
use WebservicesNl\Common\Exception\Server\NoServerAvailableException;
6
use WebservicesNl\Connector\Client\ClientInterface;
7
use WebservicesNl\Protocol\Soap\Client\SoapClient;
8
9
/**
10
 * SoapAdapter.
11
 *
12
 * Soap protocol adapter for a ConnectorInterface to connect to the Webservices API.
13
 *
14
 * @codeCoverageIgnore This is a silly proxy class
15
 */
16
class SoapAdapter extends AbstractAdapter
17
{
18
    const PROTOCOL_NAME = 'soap';
19
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @param string $functionName name of the function call
24
     * @param mixed  $args         arguments for the function call
25
     *
26
     * @throws NoServerAvailableException
27
     * @return mixed
28
     * @throws \SoapFault
29
     * @throws \Exception
30
     */
31
    public function call($functionName, $args)
32
    {
33
        if (in_array($functionName, get_class_methods('SoapClient'), false)) {
34
            return $this->client->{$functionName}($args);
35
        }
36
37
        return $this->getClient()->soapCall($functionName, $args);
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     *
43
     * @return SoapClient|ClientInterface
44
     */
45
    public function getClient()
46
    {
47
        return $this->client;
48
    }
49
}
50