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