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

SecurityService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getHash() 0 3 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