Are you sure the assignment to $contact_id is correct as $contact->create() (which targets Install_Helper_Contact::create()) seems to always return null.
This check looks for function or method calls that always return null and whose
return value is assigned to a variable.
array('belong_to' => 1, ... 'body' => 'new test!') is of type array<string,integer|nul...ring","body":"string"}>, but the function expects a object<Struct>.
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:
functionacceptsInteger($int){}$x='123';// string "123"// Instead ofacceptsInteger($x);// we recommend to useacceptsInteger((integer)$x);
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.