Not only does it help prevent accidental assignments, but also avoids confusion when we do intentionally want to make an assignment when evaluating a condition.
if (null !== $article = $repository->findOneById($request->query->get('id'))) {
$title = $article->getTitle();
//....
}