Code Duplication    Length = 19-25 lines in 2 locations

src/Console/IndexCreatorCommand.php 1 location

@@ 68-92 (lines=25) @@
65
     *
66
     * @return array
67
     */
68
    protected function getOptions()
69
    {
70
        return [
71
            ['database', 'db', InputOption::VALUE_REQUIRED, 'The database connection to use.', $this->defaultDatabase],
72
            [
73
                'where',
74
                'w',
75
                InputOption::VALUE_REQUIRED,
76
                'the WHERE clause of the index.',
77
                '',
78
            ],
79
            [
80
                'ignore',
81
                'ig',
82
                InputOption::VALUE_NONE,
83
                'if a primary index already exists, an exception will be thrown unless this is set to true.',
84
            ],
85
            [
86
                'defer',
87
                'd',
88
                InputOption::VALUE_NONE,
89
                'true to defer building of the index until buildN1qlDeferredIndexes()}is called (or a direct call to the corresponding query service API)',
90
            ],
91
        ];
92
    }
93
94
    /**
95
     * Execute the console command

src/Console/PrimaryIndexCreatorCommand.php 1 location

@@ 66-84 (lines=19) @@
63
     *
64
     * @return array
65
     */
66
    protected function getOptions()
67
    {
68
        return [
69
            ['database', 'db', InputOption::VALUE_REQUIRED, 'The database connection to use.', $this->defaultDatabase],
70
            ['name', 'n', InputOption::VALUE_REQUIRED, 'the custom name for the primary index.', '#primary'],
71
            [
72
                'ignore',
73
                'ig',
74
                InputOption::VALUE_NONE,
75
                'if a primary index already exists, an exception will be thrown unless this is set to true.',
76
            ],
77
            [
78
                'defer',
79
                'd',
80
                InputOption::VALUE_NONE,
81
                'true to defer building of the index until buildN1qlDeferredIndexes()}is called (or a direct call to the corresponding query service API)',
82
            ],
83
        ];
84
    }
85
86
    /**
87
     * Execute the console command