JsonToken
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 0
eloc 10
c 3
b 0
f 0
dl 0
loc 28
1
<?php
2
3
namespace Violet\StreamingJsonEncoder;
4
5
/**
6
 * List of JSON tokens outputted by the encoder.
7
 *
8
 * @author Riikka Kalliomäki <[email protected]>
9
 * @copyright Copyright (c) 2017-2020 Riikka Kalliomäki
10
 * @license http://opensource.org/licenses/mit-license.php MIT License
11
 */
12
final class JsonToken
13
{
14
    /** Represents the [ character that begins an array */
15
    const T_LEFT_BRACKET = 1;
16
17
    /** Represents the ] character the ends an array */
18
    const T_RIGHT_BRACKET = 2;
19
20
    /** Represents the { character that begins an object */
21
    const T_LEFT_BRACE = 3;
22
23
    /** Represents the } character that ends an object */
24
    const T_RIGHT_BRACE = 4;
25
26
    /** Represents a name in an object name/value pair */
27
    const T_NAME = 5;
28
29
    /** Represent the : character that separates a name and a value */
30
    const T_COLON = 6;
31
32
    /** Represents all values */
33
    const T_VALUE = 7;
34
35
    /** Represents the , character that separates array values and object name/value pairs */
36
    const T_COMMA = 8;
37
38
    /** Represents all whitespace */
39
    const T_WHITESPACE = 9;
40
}
41