denyAccessUnlessGranted(SnipVoter::VIEW, $to->getSnip()); if ($from === null) { $from = $to->getParent(); } $diff = MyersDiff::buildDiffLines( SnipContentService::rebuildText($from), SnipContentService::rebuildText($to), ); return $this->render('content/compare.html.twig', [ 'snip' => $to->getSnip(), 'diff' => $diff, ]); } }