GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

JsonSerializable
last analyzed

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
jsonSerialize() 0 1 ?
1
<?php
2
3
/**
4
 * JsonSerializable
5
 *
6
 * Provides forward compatibility with PHP 5.4
7
 *
8
 * @see http://php.net/manual/en/class.jsonserializable.php
9
 */
10
interface JsonSerializable
0 ignored issues
show
Coding Style Compatibility introduced by
Each interface must be in a namespace of at least one level (a top-level vendor name)

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
11
{
12
    /**
13
     * Specify data which should be serialized to JSON.
14
     *
15
     * @return mixed
16
     */
17
    public function jsonSerialize();
18
}
19