Code Duplication    Length = 10-10 lines in 4 locations

src/MenuStyle.php 4 locations

@@ 189-198 (lines=10) @@
186
     *
187
     * @return string
188
     */
189
    public function getSelectedSetCode()
190
    {
191
        return sprintf(
192
            "\033[%sm",
193
            implode(';', [
194
                self::$availableBackgroundColors[$this->getFg()]['set'],
195
                self::$availableForegroundColors[$this->getBg()]['set'],
196
            ])
197
        );
198
    }
199
200
    /**
201
     * Get the colour unset code for Bg and Fg
@@ 205-214 (lines=10) @@
202
     *
203
     * @return string
204
     */
205
    public function getSelectedUnsetCode()
206
    {
207
        return sprintf(
208
            "\033[%sm",
209
            implode(';', [
210
                self::$availableBackgroundColors[$this->getBg()]['unset'],
211
                self::$availableForegroundColors[$this->getFg()]['unset'],
212
            ])
213
        );
214
    }
215
216
    /**
217
     * Get the inverted colour code
@@ 221-230 (lines=10) @@
218
     *
219
     * @return string
220
     */
221
    public function getUnselectedSetCode()
222
    {
223
        return sprintf(
224
            "\033[%sm",
225
            implode(';', [
226
                self::$availableBackgroundColors[$this->getBg()]['set'],
227
                self::$availableForegroundColors[$this->getFg()]['set'],
228
            ])
229
        );
230
    }
231
232
    /**
233
     * Get the inverted colour unset code
@@ 237-246 (lines=10) @@
234
     *
235
     * @return string
236
     */
237
    public function getUnselectedUnsetCode()
238
    {
239
        return sprintf(
240
            "\033[%sm",
241
            implode(';', [
242
                self::$availableBackgroundColors[$this->getBg()]['unset'],
243
                self::$availableForegroundColors[$this->getFg()]['unset'],
244
            ])
245
        );
246
    }
247
248
    /**
249
     * Calculate the contents width