Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | protected function normalizeValue( $value ) |
||
40 | { |
||
41 | if( $value instanceof DateTime ) { |
||
42 | $value = $value->format( 'Y-m-d H:i:s' ); |
||
43 | } |
||
44 | else if( $this->isObjectOrArray( $value )) { |
||
45 | $value = print_r( json_decode( json_encode( $value )), true ); |
||
46 | } |
||
47 | else if( is_resource( $value )) { |
||
48 | $value = (string)$value; |
||
49 | } |
||
50 | return esc_html( $value ); |
||
51 | } |
||
53 |