Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
37 | public function displayText() |
||
38 | { |
||
39 | if ($this->type == 'EVENT') |
||
40 | { |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | if ($this->playOrder == 0) |
||
45 | { |
||
46 | return '► Now Playing'; |
||
47 | } |
||
48 | |||
49 | if ($this->playOrder == 1) |
||
50 | { |
||
51 | return 'Up Next:'; |
||
52 | } |
||
53 | |||
54 | return $this->show->getRelativeAirDate() . ' ' . $this->show->timespan(); |
||
55 | } |
||
56 | |||
108 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: