Completed
Push — master ( 4f1aef...bc924a )
by Patrick
03:28
created

JsonSerializable

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
jsonSerialize() 0 1 ?
1
<?php
2
/**
3
* JsonSerializable interface
4
*
5
* PHP 5.3 compatibility for PHP 5.4's \JsonSerializable
6
*
7
* @author Sam-Mauris Yong / [email protected]
8
* @copyright Copyright (c) 2010-2012, Sam-Mauris Yong
9
* @license http://www.opensource.org/licenses/bsd-license New BSD License
10
* @link http://www.php.net/manual/en/class.jsonserializable.php
11
*/
12
13
if(PHP_VERSION_ID < 50400)
14
{
15
/**
16
* JsonSerializable interface
17
*
18
* PHP 5.3 compatibility for PHP 5.4's \JsonSerializable
19
*
20
* @author Sam-Mauris Yong / [email protected]
21
* @copyright Copyright (c) 2010-2012, Sam-Mauris Yong
22
* @license http://www.opensource.org/licenses/bsd-license New BSD License
23
* @link http://www.php.net/manual/en/class.jsonserializable.php
24
*/
25
interface JsonSerializable {
26
    /** The jsonSerizlize function as defined by PHP 5.4 and greater */
27
    public function jsonSerialize();
28
}
29
}
30
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
31