| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 4 |
| Ratio | 44.44 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | function getCalendarHomeForPrincipal($principalUrl) { |
||
|
|
|||
| 32 | |||
| 33 | View Code Duplication | if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { |
|
| 34 | list(, $principalId) = URLUtil::splitPath($principalUrl); |
||
| 35 | return self::CALENDAR_ROOT .'/' . $principalId; |
||
| 36 | } |
||
| 37 | |||
| 38 | return; |
||
| 39 | } |
||
| 40 | |||
| 42 |
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.