Code Duplication    Length = 11-11 lines in 2 locations

src/Commands/ResourceCommand.php 2 locations

@@ 180-190 (lines=11) @@
177
        }));
178
    }
179
180
    protected function rules()
181
    {
182
        return array_map(function($field){
183
            return [
184
                'name' => $field['name'],
185
                'rule' => $field['rules']
186
            ];
187
        }, array_filter($this->fields, function($field){
188
            return !empty($field['rules']);
189
        }));
190
    }
191
192
    protected function schema()
193
    {
@@ 254-264 (lines=11) @@
251
        }, $this->foreignKeys(false));
252
    }
253
254
    protected function factoryFields()
255
    {
256
        return array_map(function($field){
257
            return [
258
                'name' => $field['name'],
259
                'type' => $field['factory']
260
            ];
261
        }, array_filter($this->fields, function($field){
262
            return isset($field['factory']) && $field['factory'];
263
        }));
264
    }
265
266
    protected function hasTimestamps()
267
    {