Passed
Push — feature/ECO-808-scrutinizer ( 956529...82fb0b )
by Andrey
05:28 queued 01:30
created

AmazonpayToUtilEncodingBridge   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A decodeJson() 0 3 1
A encodeJson() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Amazonpay\Dependency\Facade;
9
10
class AmazonpayToUtilEncodingBridge implements AmazonpayToUtilEncodingInterface
11
{
12
13
    /**
14
     * @var \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface
15
     */
16
    protected $utilEncodingService;
17
18
    /**
19
     * @param \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface $utilEncodingService
20
     */
21
    public function __construct($utilEncodingService)
22
    {
23
        $this->utilEncodingService = $utilEncodingService;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     *
29
     * @api
30
     *
31
     * @param string $jsonValue
32
     * @param int|null $options
33
     * @param int|null $depth
34
     *
35
     * @return string
36
     */
37
    public function encodeJson($jsonValue, $options = null, $depth = null)
38
    {
39
        return $this->utilEncodingService->encodeJson($jsonValue, $options, $depth);
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     *
45
     * @api
46
     *
47
     * @param string $jsonValue
48
     * @param bool $assoc
49
     * @param int|null $depth
50
     * @param int|null $options
51
     *
52
     * @return array
53
     */
54
    public function decodeJson($jsonValue, $assoc = false, $depth = null, $options = null)
55
    {
56
        return $this->utilEncodingService->decodeJson($jsonValue, $assoc, $depth, $options);
57
    }
58
59
}
60