| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function setAttributes(CalendarTime $startTime, CalendarTime $endTime) |
||
| 21 | { |
||
| 22 | if ($this->isValidPeriod($startTime, $endTime)) { |
||
| 23 | $this->startTime = $startTime; |
||
| 24 | $this->endTime = $endTime; |
||
| 25 | } else { |
||
| 26 | user_error('CalendarTimePeriod::setAttributes() : you cannot construct a \'CalendarTimePeriod\' with the $startTime attribute superior or equal to the $endTime attribute', E_USER_ERROR); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 44 |
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.