From ee07be39a7665bc14fcef600e3e51224496c1615 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Tue, 19 Apr 2022 13:16:32 +0100 Subject: [PATCH] Code cleanup --- dgi_fixity.module | 1 - src/Controller/FixityCheckController.php | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dgi_fixity.module b/dgi_fixity.module index 85b49a3..a974756 100644 --- a/dgi_fixity.module +++ b/dgi_fixity.module @@ -13,7 +13,6 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Mail\MailFormatHelper; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; -use Drupal\dgi_fixity\EntityTypeInfo; use Drupal\dgi_fixity\Form\SettingsForm; use Drupal\user\Entity\User; diff --git a/src/Controller/FixityCheckController.php b/src/Controller/FixityCheckController.php index 0b25590..1c3ec5c 100644 --- a/src/Controller/FixityCheckController.php +++ b/src/Controller/FixityCheckController.php @@ -129,10 +129,10 @@ class FixityCheckController extends ControllerBase { 'fixity_check' => $fixity_check->id(), 'fixity_check_revision' => $revision_id, ] - ))->toString(); + )); } else { - $link = $fixity_check->toLink($date)->toString(); + $link = $fixity_check->toLink($date); $currentRevisionDisplayed = TRUE; } @@ -143,14 +143,10 @@ class FixityCheckController extends ControllerBase { $row = [ [ - 'data' => [ - '#markup' => $link, - ], + 'data' => $link->toRenderable(), ], [ - 'data' => [ - '#markup' => $this->renderer->renderRoot($state), - ], + 'data' => $state, ], ];