From 2bbc280ce6b7d8a9dd44bc09598f6d37dfd010c6 Mon Sep 17 00:00:00 2001 From: mattclegg Date: Sat, 4 Apr 2020 14:29:00 +0545 Subject: [PATCH] ENHANCEMENT: Remove unused $controller from lambda function --- code/Controllers/CMSMain.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index c6e53309..b39f5a0b 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -1674,9 +1674,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr 'getTreeTitle' => 'HTMLFragment' )); - $controller = $this; $columns->setFieldFormatting(array( - 'listChildrenLink' => function ($value, &$item) use ($controller) { + 'listChildrenLink' => function ($value, &$item) { /** @var SiteTree $item */ $num = $item ? $item->numChildren() : null; if ($num) { @@ -1687,7 +1686,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr ); } }, - 'getTreeTitle' => function ($value, &$item) use ($controller) { + 'getTreeTitle' => function ($value, &$item) { $title = sprintf( '%s', Controller::join_links(