protected function extendStub($stub)
    {
        /** @var \Illuminate\Filesystem\Filesystem $files */
        $files = App::make('Illuminate\Filesystem\Filesystem');
        $content = $files->get(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'command.stub');

        $replacements = [
            'use Illuminate\Console\Command' => "use Indatus\\Dispatcher\\Scheduling\\ScheduledCommand;\n".
                "use Indatus\\Dispatcher\\Scheduling\\Schedulable;\n".
                "use Indatus\\Dispatcher\\Drivers\\".ucwords(Config::get('dispatcher::driver'))."\\Scheduler",
            'extends Command {' => 'extends ScheduledCommand {',
            'parent::__construct();' => $content,
        ];

        $stub = str_replace(array_keys($replacements), array_values($replacements), $stub);

        return $stub;
    }
protected function extendStub($stub)
    {
        /** @var \Illuminate\Filesystem\Filesystem $files */
        $files = App::make('Illuminate\Filesystem\Filesystem');
        $content = $files->get(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'command.stub');

        $replacements = [
            'use Illuminate\Console\Command' => "use Indatus\\Dispatcher\\Scheduling\\ScheduledCommand;\n".
                "use Indatus\\Dispatcher\\Scheduling\\Schedulable;\n".
                "use Indatus\\Dispatcher\\Drivers\\".ucwords(Config::get('dispatcher::driver'))."\\Scheduler",
            'extends Command {' => 'extends ScheduledCommand {',
            'parent::__construct();' => $content,
        ];

        $stub = str_replace(array_keys($replacements), array_values($replacements), $stub);

        return $stub;
    }
protected function extendStub ( $ stub ) { /** @var \Illuminate\Filesystem\Filesystem $files */ $ files = App :: make ( 'Illuminate\Filesystem\Filesystem' ) ; $ content = $ files -> get ( __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'command.stub' ) ; $ replacements = [ 'use Illuminate\Console\Command' => "use Indatus\\Dispatcher\\Scheduling\\ScheduledCommand;\n" . "use Indatus\\Dispatcher\\Scheduling\\Schedulable;\n" . "use Indatus\\Dispatcher\\Drivers\\" . ucwords ( Config :: get ( 'dispatcher::driver' ) ) . "\\Scheduler" , 'extends Command {' => 'extends ScheduledCommand {' , 'parent::__construct();' => $ content , ] ; $ stub = str_replace ( array_keys ( $ replacements ) , array_values ( $ replacements ) , $ stub ) ; return $ stub ; }
Make sure we're implementing our own class
@param $stub
@return string
Make sure we re implementing our own class