Code Duplication    Length = 10-10 lines in 4 locations

src/MenuStyle.php 4 locations

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