Code Duplication    Length = 11-11 lines in 2 locations

src/Commands/ResourceCommand.php 2 locations

@@ 133-143 (lines=11) @@
130
        }));
131
    }
132
133
    protected function rules()
134
    {
135
        return array_map(function($field){
136
            return [
137
                'name' => $field['name'],
138
                'rule' => $field['rules']
139
            ];
140
        }, array_filter($this->fields, function($field){
141
            return !empty($field['rules']);
142
        }));
143
    }
144
145
    protected function schema()
146
    {
@@ 184-194 (lines=11) @@
181
        }, $this->foreignKeys());
182
    }
183
184
    protected function factoryFields()
185
    {
186
        return array_map(function($field){
187
            return [
188
                'name' => $field['name'],
189
                'type' => $field['factory']
190
            ];
191
        }, array_filter($this->fields, function($field){
192
            return isset($field['factory']) && $field['factory'];
193
        }));
194
    }
195
196
    protected function hasTimestamps()
197
    {