RawJson::jsonSerialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Swaggest\Json;
4
5
class RawJson implements \JsonSerializable
6
{
7
    const MARKER = '__RAW_JSON__';
8
    private $value;
9
10
    /**
11
     * RawJson constructor.
12
     * @param $value
13
     */
14
    public function __construct($value)
15
    {
16
        $this->value = $value;
17
    }
18
19
    function jsonSerialize()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
    {
21
        return self::MARKER . $this->value . self::MARKER;
22
    }
23
}