1 | <?php |
||
23 | class UserMessagesSettings extends FormAbstract |
||
24 | { |
||
25 | /** |
||
26 | * @var Collection |
||
27 | */ |
||
28 | protected $projects; |
||
29 | |||
30 | /** |
||
31 | * @var Collection |
||
32 | */ |
||
33 | protected $messages; |
||
34 | |||
35 | /** |
||
36 | * @var Message |
||
37 | */ |
||
38 | protected $defaultMessage; |
||
39 | |||
40 | /** |
||
41 | * @param Collection $projects |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function setProjects(Collection $projects) |
||
51 | |||
52 | /** |
||
53 | * @return array |
||
54 | */ |
||
55 | public function actions() |
||
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | public function fields() |
||
82 | |||
83 | /** |
||
84 | * @param ProjectModel $project |
||
85 | * @param array $messages |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | protected function getSelectField(ProjectModel $project, array $messages) |
||
101 | |||
102 | /** |
||
103 | * Returns collection of all messages options. |
||
104 | * |
||
105 | * @return Collection |
||
106 | */ |
||
107 | protected function getMessages() |
||
115 | |||
116 | /** |
||
117 | * Return default message for the current logged user based on the role. |
||
118 | * |
||
119 | * @return Message |
||
120 | */ |
||
121 | protected function getDefaultMessage() |
||
130 | |||
131 | /** |
||
132 | * Return value of selected message for a project. |
||
133 | * |
||
134 | * @param ProjectModel $project |
||
135 | * |
||
136 | * @return int |
||
137 | */ |
||
138 | protected function getSelectedMessage(ProjectModel $project) |
||
148 | } |
||
149 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: