Code Duplication    Length = 8-8 lines in 2 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

@@ 61-68 (lines=8) @@
58
     *
59
     * @return string
60
     */
61
    protected function getStub()
62
    {
63
        $config = $this->laravel['config'];
64
65
        return $config->get('datatables-buttons.stub')
66
            ? base_path() . $config->get('datatables-buttons.stub') . '/html.stub'
67
            : __DIR__ . '/stubs/html.stub';
68
    }
69
70
    /**
71
     * Parse the name and format according to the root namespace.