| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 94 | public function serialize() |
||
| 95 | { |
||
| 96 | $serializedWeekDays = array_map( |
||
| 97 | function (WeekDay $weekDay) { |
||
| 98 | return $weekDay->getValue(); |
||
| 99 | }, |
||
| 100 | $this->weekDays |
||
| 101 | ) ; |
||
| 102 | |||
| 103 | return [ |
||
| 104 | 'opens' => $this->opens->toNativeDateTime()->format(self::FORMAT), |
||
| 105 | 'closes' => $this->closes->toNativeDateTime()->format(self::FORMAT), |
||
| 106 | 'dayOfWeek' => $serializedWeekDays |
||
| 107 | ]; |
||
| 108 | } |
||
| 109 | } |
||
| 110 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..