Jsonc   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setJsonc() 0 4 1
A isJsonc() 0 3 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