| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function getBestTitle() |
||
| 45 | { |
||
| 46 | $image = $this->Image(); |
||
| 47 | if($image && $image->exists()) { |
||
| 48 | if($image->Title) { |
||
| 49 | if($this->Title !== $image->Title) { |
||
| 50 | $this->Title = $image->Title; |
||
| 51 | $this->write(); |
||
| 52 | } |
||
| 53 | return $image->Title; |
||
| 54 | } |
||
| 55 | } |
||
| 56 | return $this->Title; |
||
| 57 | } |
||
| 58 | |||
| 78 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.