Code Duplication    Length = 11-11 lines in 2 locations

src/Commands/ResourceCommand.php 2 locations

@@ 124-134 (lines=11) @@
121
        }));
122
    }
123
124
    protected function rules()
125
    {
126
        return array_map(function($field){
127
            return [
128
                'name' => $field['name'],
129
                'rule' => $field['rules']
130
            ];
131
        }, array_filter($this->fields, function($field){
132
            return !empty($field['rules']);
133
        }));
134
    }
135
136
    protected function schema()
137
    {
@@ 175-185 (lines=11) @@
172
        }, $this->foreignKeys());
173
    }
174
175
    protected function factoryFields()
176
    {
177
        return array_map(function($field){
178
            return [
179
                'name' => $field['name'],
180
                'type' => $field['factory']
181
            ];
182
        }, array_filter($this->fields, function($field){
183
            return isset($field['factory']) && $field['factory'];
184
        }));
185
    }
186
187
    protected function hasTimestamps()
188
    {