Problem/Motivation
/**
* Implements PHP magic __toString method to convert the query to a string.
*
* In the degenerate case, there is no string-able query as this operation
* is potentially two queries.
*
* @return string
* The prepared query statement.
*/
public function __toString() {
}
This causes errors in phpcs with Drupal.Commenting.FunctionComment.InvalidNoReturn enabled and also phpstan.
It was added in commit 67429ab19fd6bc03295831270054ad40bd2c9163 in 2011 and does not have a d.o issue.
In #2722647-59: [Meta] Fix Drupal.Commenting.FunctionComment.InvalidNoReturn 3) xjm stated, "This is an actual behavior change and seems like it needs its own issue, with tests"