| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | function get( $post_id, $meta_key ) { |
||
|
|
|||
| 26 | |||
| 27 | /* |
||
| 28 | * Map the value in the meta |
||
| 29 | * The UI for the meta date enable two forms, a number of minutes |
||
| 30 | * or an h:mm format. |
||
| 31 | * Both needs to be adjusted to the iso format. |
||
| 32 | */ |
||
| 33 | return array_map( function ( $value ) { |
||
| 34 | return 'PT' . str_replace( ':', 'H', $value ) . 'M'; |
||
| 35 | }, parent::get( $post_id, $meta_key ) ); |
||
| 36 | } |
||
| 37 | |||
| 39 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.