Code Duplication    Length = 3-3 lines in 3 locations

src/Ui/Form/Component/Action/Command/SetActiveAction.php 1 location

@@ 33-35 (lines=3) @@
30
        $options = $this->builder->getFormOptions();
31
        $actions = $this->builder->getFormActions();
32
33
        if ($action = $actions->findBySlug(app('request')->get($options->get('prefix') . 'action'))) {
34
            $action->setActive(true);
35
        }
36
37
        if (!$action && $action = $actions->first()) {
38
            $action->setActive(true);

src/Ui/Table/Component/Action/Command/SetActiveAction.php 1 location

@@ 42-44 (lines=3) @@
39
        $prefix  = $this->builder->getTableOption('prefix');
40
        $actions = $this->builder->getTableActions();
41
42
        if ($action = $actions->findBySlug(app('request')->get($prefix . 'action'))) {
43
            $action->setActive(true);
44
        }
45
    }
46
}
47

src/Ui/Table/Component/View/Command/SetActiveView.php 1 location

@@ 51-53 (lines=3) @@
48
            return;
49
        }
50
51
        if ($view = $views->findBySlug($request->get($options->get('prefix') . 'view'))) {
52
            $view->setActive(true);
53
        }
54
55
        if (!$view && $view = $views->first()) {
56
            $view->setActive(true);