| 1 | <?php |
||
| 9 | class MessageFactory |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var MessageTextExtractor |
||
| 13 | */ |
||
| 14 | private $extractor; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Constructor. |
||
| 18 | * |
||
| 19 | * @param MessageTextExtractor $extractor |
||
| 20 | */ |
||
| 21 | 18 | public function __construct(MessageTextExtractor $extractor) |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param ApplicationUser[] $users |
||
| 28 | * @param object $object |
||
| 29 | * @param string $language |
||
| 30 | * @return DefaultMessage |
||
| 31 | */ |
||
| 32 | 18 | public function buildMessage(array $users, $object, $language = null) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param ApplicationUser[] $users |
||
| 51 | * @return ApplicationUser[] |
||
| 52 | */ |
||
| 53 | 18 | private static function filterUsers(array $users) |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @param ApplicationUser[] $users |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 3 | private static function getLanguage(array $users) |
|
| 72 | } |
||
| 73 |
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: