| 1 | <?php |
||
| 7 | class DayOfWeekCollection implements SerializableInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string[] |
||
| 11 | */ |
||
| 12 | private $daysOfWeek = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * DayOfWeekCollection constructor. |
||
| 16 | * @param DayOfWeek|null $dayOfWeek |
||
| 17 | */ |
||
| 18 | public function __construct(DayOfWeek $dayOfWeek = null) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Keeps the collection of days of week unique. |
||
| 27 | * Makes sure that the objects are stored as strings to allow PHP serialize method. |
||
| 28 | * |
||
| 29 | * @param DayOfWeek $dayOfWeek |
||
| 30 | * @return DayOfWeekCollection |
||
| 31 | */ |
||
| 32 | public function addDayOfWeek(DayOfWeek $dayOfWeek) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return DayOfWeek[] |
||
| 48 | */ |
||
| 49 | public function getDaysOfWeek() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @inheritdoc |
||
| 61 | */ |
||
| 62 | public static function deserialize(array $data) |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @inheritdoc |
||
| 77 | */ |
||
| 78 | public function serialize() |
||
| 82 | } |
||
| 83 |
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..