Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
35 | public function url($object, array $options = []) |
||
36 | { |
||
37 | $ret = parent::url($object, $options); |
||
38 | |||
39 | if ($this->baseUrlLen && substr($ret, 0, $this->baseUrlLen) == $this->baseUrl) { |
||
40 | $ret = substr($ret, $this->baseUrlLen); |
||
41 | } |
||
42 | $ret = ltrim($ret, '/'); |
||
43 | if (!empty($options['absolute'])) { |
||
44 | $ret = $this->prefix . '/' . $ret; |
||
45 | } |
||
46 | return $ret; |
||
47 | } |
||
49 |