Code Duplication    Length = 8-8 lines in 3 locations

src/Generators/DataTablesScopeCommand.php 1 location

@@ 46-53 (lines=8) @@
43
     *
44
     * @return string
45
     */
46
    protected function getStub()
47
    {
48
        if ($stubFolder = $this->laravel['config']->get('datatables-buttons.stub')) {
49
            return base_path($stubFolder . '/scopes.stub');
50
        }
51
52
        return __DIR__ . '/stubs/scopes.stub';
53
    }
54
}
55

src/Generators/DataTablesHtmlCommand.php 1 location

@@ 268-275 (lines=8) @@
265
     *
266
     * @return string
267
     */
268
    protected function getStub()
269
    {
270
        $config = $this->laravel['config'];
271
272
        return $config->get('datatables-buttons.stub')
273
            ? base_path() . $config->get('datatables-buttons.stub') . '/html.stub'
274
            : __DIR__ . '/stubs/html.stub';
275
    }
276
277
    /**
278
     * Get the console command options.

src/Generators/DataTablesMakeCommand.php 1 location

@@ 225-232 (lines=8) @@
222
     *
223
     * @return string
224
     */
225
    protected function getStub()
226
    {
227
        $config = $this->laravel['config'];
228
229
        return $config->get('datatables-buttons.stub')
230
            ? base_path() . $config->get('datatables-buttons.stub') . '/datatables.stub'
231
            : __DIR__ . '/stubs/datatables.stub';
232
    }
233
234
    /**
235
     * Get the console command options.