Failed Conditions
Push — master ( b15b87...797163 )
by Florent
03:08
created

JsonConverter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2017 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace Jose\Component\Core\Converter;
15
16
/**
17
 * Interface JsonConverter.
18
 */
19
interface JsonConverter
20
{
21
    /**
22
     * @param $payload
23
     *
24
     * @return string
25
     */
26
    public function encode($payload): string;
27
28
    /**
29
     * @param string $payload
30
     * @param bool   $associativeArray
31
     *
32
     * @return mixed
33
     */
34
    public function decode(string $payload, bool $associativeArray = true);
35
}
36