Code Duplication    Length = 10-10 lines in 3 locations

src/Configuration/Form/ConfigurationFormFields.php 3 locations

@@ 77-86 (lines=10) @@
74
            $field['config'] = array_get($field, 'config', []);
75
76
            // Default the label.
77
            if (trans()->has(
78
                $label = array_get(
79
                    $field,
80
                    'label',
81
                    $namespace . 'configuration.' . $slug . '.label'
82
                )
83
            )
84
            ) {
85
                $field['label'] = $label;
86
            }
87
88
            // Default the label.
89
            $field['label'] = array_get(
@@ 96-105 (lines=10) @@
93
            );
94
95
            // Default the warning.
96
            if (trans()->has(
97
                $warning = array_get(
98
                    $field,
99
                    'warning',
100
                    $namespace . 'configuration.' . $slug . '.warning'
101
                )
102
            )
103
            ) {
104
                $field['warning'] = $warning;
105
            }
106
107
            // Default the placeholder.
108
            $field['config']['placeholder'] = array_get(
@@ 115-124 (lines=10) @@
112
            );
113
114
            // Default the instructions.
115
            if (trans()->has(
116
                $instructions = array_get(
117
                    $field,
118
                    'instructions',
119
                    $namespace . 'configuration.' . $slug . '.instructions'
120
                )
121
            )
122
            ) {
123
                $field['instructions'] = $instructions;
124
            }
125
126
            // Get the value defaulting to the default value.
127
            if ($applied = $configuration->get($namespace . $slug, $scope)) {