$scanner->getMailCrmId() of type array is incompatible with the type integer expected by parameter $sourceRecordId of OSSMailView_Relation_Model::addRelation().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
33
if ($relationModel->addRelation(/** @scrutinizer ignore-type */ $scanner->getMailCrmId(), $id, $scanner->get('date'))) {