Skip to content

Commit

Permalink
ENHANCEMENT: Remove unused $controller from lambda function
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclegg committed Apr 4, 2020
1 parent 9cb96bf commit 2bbc280
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/Controllers/CMSMain.php
Expand Up @@ -1674,9 +1674,8 @@ public function ListViewForm()
'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) {
Expand All @@ -1687,7 +1686,7 @@ public function ListViewForm()
);
}
},
'getTreeTitle' => function ($value, &$item) use ($controller) {
'getTreeTitle' => function ($value, &$item) {
$title = sprintf(
'<a class="action-detail" href="%s">%s</a>',
Controller::join_links(
Expand Down

0 comments on commit 2bbc280

Please sign in to comment.