Code Duplication    Length = 10-10 lines in 4 locations

src/MenuStyle.php 4 locations

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