Passed
Push — master ( a8f3a0...0e6cb9 )
by C.
02:17
created

SecurityService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of PHP CS Fixer.
5
 *
6
 * (c) Fabien Potencier <[email protected]>
7
 *     Dariusz Rumiński <[email protected]>
8
 *
9
 * This source file is subject to the MIT license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Etrias\PaazlConnector\Services;
14
15
use Etrias\PaazlConnector\SoapClient;
16
17
class SecurityService implements SecurityServiceInterface
18
{
19
    /**
20
     * @var SoapClient
21
     */
22
    protected $soapClient;
23
24
    /**
25
     * SecurityService constructor.
26
     *
27
     * @param SoapClient $soapClient
28
     */
29
    public function __construct(SoapClient $soapClient)
30
    {
31
        $this->soapClient = $soapClient;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getHash($input)
38
    {
39
        return sha1($this->soapClient->getWebShopId().$this->soapClient->getPassword().$input);
40
    }
41
}
42