| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function getLabel() |
||
| 43 | { |
||
| 44 | // if the property is a date object converting it to a human readable representation. |
||
| 45 | if ($this->literal instanceof EasyRdf_Literal_Date) { |
||
| 46 | try { |
||
| 47 | $val = $this->literal->getValue(); |
||
| 48 | return Punic\Calendar::formatDate($val, 'short'); |
||
| 49 | } catch (Exception $e) { |
||
| 50 | trigger_error($e->getMessage(), E_USER_WARNING); |
||
| 51 | return (string) $this->literal; |
||
| 52 | } |
||
| 53 | } |
||
| 54 | return $this->literal->getValue(); |
||
| 55 | } |
||
| 56 | |||
| 68 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.