ClientInstantiator::instantiateClient()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace LaFourchette\AdobeCampaignClientBundle\Client;
4
5
/**
6
 * Instantiate SOAP client class, untestable so nothing else
7
 */
8
class ClientInstantiator
9
{
10
    /**
11
     * Instantiate an AdobeCampaign Client
12
     *
13
     * @param $wsdlPath
14
     *
15
     * @return Client
16
     */
17
    public function instantiateClient($wsdlPath)
18
    {
19
        return new Client($wsdlPath);
20
    }
21
22
    /**
23
     * Instantiate a classic php SOAPClient
24
     *
25
     * @param $wsdl
26
     * @param $options
27
     *
28
     * @return \SoapClient
29
     */
30
    public function instantiateBasicClient($wsdl, $options)
31
    {
32
        return new \SoapClient($wsdl, $options);
33
    }
34
}
35