Jsonc::setJsonc()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Json encoding
4
 * User: moyo
5
 * Date: 23/10/2017
6
 * Time: 10:35 AM
7
 */
8
9
namespace Carno\RPC\Chips\Protocol;
10
11
trait Jsonc
12
{
13
    /**
14
     * @var bool
15
     */
16
    private $jsonc = false;
17
18
    /**
19
     * @return bool
20
     */
21
    public function isJsonc() : bool
22
    {
23
        return $this->jsonc;
24
    }
25
26
    /**
27
     * @param bool $switch
28
     * @return static
29
     */
30
    public function setJsonc(bool $switch = true) : self
31
    {
32
        $this->jsonc = $switch;
33
        return $this;
34
    }
35
}
36