Code Duplication    Length = 10-10 lines in 4 locations

src/MenuStyle.php 4 locations

@@ 214-223 (lines=10) @@
211
    /**
212
     * Get the colour code set for Bg and Fg
213
     */
214
    public function getSelectedSetCode() : string
215
    {
216
        return sprintf(
217
            "\033[%sm",
218
            implode(';', [
219
                self::$availableBackgroundColors[$this->getFg()]['set'],
220
                self::$availableForegroundColors[$this->getBg()]['set'],
221
            ])
222
        );
223
    }
224
225
    /**
226
     * Get the colour unset code for Bg and Fg
@@ 228-237 (lines=10) @@
225
    /**
226
     * Get the colour unset code for Bg and Fg
227
     */
228
    public function getSelectedUnsetCode() : string
229
    {
230
        return sprintf(
231
            "\033[%sm",
232
            implode(';', [
233
                self::$availableBackgroundColors[$this->getBg()]['unset'],
234
                self::$availableForegroundColors[$this->getFg()]['unset'],
235
            ])
236
        );
237
    }
238
239
    /**
240
     * Get the inverted colour code
@@ 242-251 (lines=10) @@
239
    /**
240
     * Get the inverted colour code
241
     */
242
    public function getUnselectedSetCode() : string
243
    {
244
        return sprintf(
245
            "\033[%sm",
246
            implode(';', [
247
                self::$availableBackgroundColors[$this->getBg()]['set'],
248
                self::$availableForegroundColors[$this->getFg()]['set'],
249
            ])
250
        );
251
    }
252
253
    /**
254
     * Get the inverted colour unset code
@@ 256-265 (lines=10) @@
253
    /**
254
     * Get the inverted colour unset code
255
     */
256
    public function getUnselectedUnsetCode() : string
257
    {
258
        return sprintf(
259
            "\033[%sm",
260
            implode(';', [
261
                self::$availableBackgroundColors[$this->getBg()]['unset'],
262
                self::$availableForegroundColors[$this->getFg()]['unset'],
263
            ])
264
        );
265
    }
266
267
    /**
268
     * Calculate the contents width