Code Duplication    Length = 3-3 lines in 6 locations

src/Ui/Form/Component/Action/ActionNormalizer.php 2 locations

@@ 75-77 (lines=3) @@
72
         * array without a slug then use the slug for
73
         * the slug for the action.
74
         */
75
        if (is_array($action) && !isset($action['slug']) && !is_numeric($slug)) {
76
            $action['slug'] = $slug;
77
        }
78
79
        /*
80
         * If the slug is not numeric and the action is an
@@ 84-86 (lines=3) @@
81
         * array without a action then use the slug for
82
         * the action for the action.
83
         */
84
        if (is_array($action) && !isset($action['action']) && !is_numeric($slug)) {
85
            $action['action'] = $slug;
86
        }
87
88
        /**
89
         * Default to size "sm"

src/Ui/Table/Component/Action/ActionNormalizer.php 2 locations

@@ 73-75 (lines=3) @@
70
         * array without a slug then use the slug for
71
         * the slug for the action.
72
         */
73
        if (is_array($action) && !isset($action['slug']) && !is_numeric($slug)) {
74
            $action['slug'] = $slug;
75
        }
76
77
        /*
78
         * If the slug is not numeric and the action is an
@@ 82-84 (lines=3) @@
79
         * array without a action then use the slug for
80
         * the action for the action.
81
         */
82
        if (is_array($action) && !isset($action['action']) && !is_numeric($slug)) {
83
            $action['action'] = $slug;
84
        }
85
86
        /*
87
         * Make sure the attributes array is set.

src/Ui/Table/Component/View/ViewNormalizer.php 2 locations

@@ 57-59 (lines=3) @@
54
             * array without a slug then use the slug for
55
             * the slug for the view.
56
             */
57
            if (is_array($view) && !isset($view['slug']) && !is_numeric($slug)) {
58
                $view['slug'] = $slug;
59
            }
60
61
            /*
62
             * Make sure we have a view property.
@@ 64-66 (lines=3) @@
61
            /*
62
             * Make sure we have a view property.
63
             */
64
            if (is_array($view) && !isset($view['view'])) {
65
                $view['view'] = $view['slug'];
66
            }
67
68
            /*
69
             * Make sure some default parameters exist.