We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 5 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | |||
35 | public function url() |
||
|
|||
36 | { |
||
37 | switch ($this->type) { |
||
38 | case 'external_link': |
||
39 | return $this->link; |
||
40 | break; |
||
41 | |||
42 | case 'internal_link': |
||
43 | return is_null($this->link) ? '#' : url($this->link); |
||
44 | break; |
||
45 | |||
46 | default: //page_link |
||
47 | if ($this->page) { |
||
48 | return url($this->page->slug); |
||
49 | } |
||
50 | break; |
||
51 | } |
||
52 | } |
||
53 | } |
||
54 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.