$query->getSQL() of type array is incompatible with the type string expected by parameter $string of PHPUnit\Framework\Assert::assertRegExp().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
28
self::assertRegExp('/SELECT DatabaseFunction\(\w+\.field\) AS /', /** @scrutinizer ignore-type */ $query->getSQL());