Conditions | 4 |
Paths | 5 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function format( $dataValue ) { |
||
29 | if ( !( $dataValue instanceof IriValue ) ) { |
||
30 | throw new InvalidArgumentException( 'DataValue is not a IriValue.' ); |
||
31 | } |
||
32 | |||
33 | $formatted = $dataValue->getScheme() . ':' |
||
34 | . $dataValue->getHierarchicalPart() |
||
35 | . ( $dataValue->getQuery() === '' ? '' : '?' . $dataValue->getQuery() ) |
||
36 | . ( $dataValue->getFragment() === '' ? '' : '#' . $dataValue->getFragment() ); |
||
37 | |||
38 | return $formatted; |
||
39 | } |
||
40 | |||
42 |