AmazonPayToUtilEncodingBridge   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A decodeJson() 0 3 1
A __construct() 0 3 1
A encodeJson() 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
     * @var \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface
14
     */
15
    protected $utilEncodingService;
16
17
    /**
18
     * @param \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface $utilEncodingService
19
     */
20
    public function __construct($utilEncodingService)
21
    {
22
        $this->utilEncodingService = $utilEncodingService;
23
    }
24
25
    /**
26
     * {@inheritDoc}
27
     *
28
     * @api
29
     *
30
     * @param mixed $jsonValue
31
     * @param int|null $options
32
     * @param int|null $depth
33
     *
34
     * @return string
35
     */
36
    public function encodeJson($jsonValue, $options = null, $depth = null)
37
    {
38
        return $this->utilEncodingService->encodeJson($jsonValue, $options, $depth);
39
    }
40
41
    /**
42
     * {@inheritDoc}
43
     *
44
     * @api
45
     *
46
     * @param string $jsonValue
47
     * @param bool $assoc
48
     * @param int|null $depth
49
     * @param int|null $options
50
     *
51
     * @return array
52
     */
53
    public function decodeJson($jsonValue, $assoc = false, $depth = null, $options = null)
54
    {
55
        return $this->utilEncodingService->decodeJson($jsonValue, $assoc, $depth, $options);
56
    }
57
}
58