Code Duplication    Length = 16-18 lines in 2 locations

src/Console/ResourceGenerator.php 2 locations

@@ 163-180 (lines=18) @@
160
        return $output;
161
    }
162
163
    public function generateShow()
164
    {
165
        $output = '';
166
167
        foreach ($this->getTableColumns() as $column) {
168
            $name    = $column->getName();
169
            $comment = $column->getComment();
170
171
            // set column comment
172
            $label = $this->formatLabel($comment ? $comment : $name);
173
174
            $output .= sprintf($this->formats['show_field'], $name, $label);
175
176
            $output .= ";\r\n";
177
        }
178
179
        return $output;
180
    }
181
182
    public function generateGrid()
183
    {
@@ 182-197 (lines=16) @@
179
        return $output;
180
    }
181
182
    public function generateGrid()
183
    {
184
        $output = '';
185
186
        foreach ($this->getTableColumns() as $column) {
187
            $name    = $column->getName();
188
            $comment = $column->getComment();
189
190
            $label = $this->formatLabel($comment ? $comment : $name);
191
192
            $output .= sprintf($this->formats['grid_column'], $name, $label);
193
            $output .= ";\r\n";
194
        }
195
196
        return $output;
197
    }
198
199
    protected function getReservedColumns()
200
    {