Code Duplication    Length = 3-3 lines in 4 locations

src/Entities/InlineKeyboard.php 4 locations

@@ 84-86 (lines=3) @@
81
82
        $buttons = [];
83
84
        if ($current_page > 1) {
85
            $buttons[] = new InlineKeyboardButton(['text' => $labels['first'], 'callback_data' => $callbacks_data['first']]);
86
        }
87
        if ($current_page > 2) {
88
            $buttons[] = new InlineKeyboardButton(['text' => $labels['previous'], 'callback_data' => $callbacks_data['previous']]);
89
        }
@@ 87-89 (lines=3) @@
84
        if ($current_page > 1) {
85
            $buttons[] = new InlineKeyboardButton(['text' => $labels['first'], 'callback_data' => $callbacks_data['first']]);
86
        }
87
        if ($current_page > 2) {
88
            $buttons[] = new InlineKeyboardButton(['text' => $labels['previous'], 'callback_data' => $callbacks_data['previous']]);
89
        }
90
91
        $buttons[] = new InlineKeyboardButton(['text' => $labels['current'], 'callback_data' => $callbacks_data['current']]);
92
@@ 93-95 (lines=3) @@
90
91
        $buttons[] = new InlineKeyboardButton(['text' => $labels['current'], 'callback_data' => $callbacks_data['current']]);
92
93
        if ($current_page < $max_pages - 1) {
94
            $buttons[] = new InlineKeyboardButton(['text' => $labels['next'], 'callback_data' => $callbacks_data['next']]);
95
        }
96
        if ($current_page < $max_pages) {
97
            $buttons[] = new InlineKeyboardButton(['text' => $labels['last'], 'callback_data' => $callbacks_data['last']]);
98
        }
@@ 96-98 (lines=3) @@
93
        if ($current_page < $max_pages - 1) {
94
            $buttons[] = new InlineKeyboardButton(['text' => $labels['next'], 'callback_data' => $callbacks_data['next']]);
95
        }
96
        if ($current_page < $max_pages) {
97
            $buttons[] = new InlineKeyboardButton(['text' => $labels['last'], 'callback_data' => $callbacks_data['last']]);
98
        }
99
100
        return new InlineKeyboard($buttons);
101
    }