Skip to content

Commit ae91d6a

Browse files
committed
Enforce PSR-2.
1 parent a6325dc commit ae91d6a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/InlineKeyboardPagination.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ protected function generateKeyboard(): array
144144
$buttons = [];
145145

146146
if ($this->number_of_pages > $this->max_buttons) {
147-
148147
$buttons[] = $this->generateButton($this->first_page);
149148

150149
$range = $this->generateRange();
@@ -154,7 +153,6 @@ protected function generateKeyboard(): array
154153
}
155154

156155
$buttons[] = $this->generateButton($this->number_of_pages);
157-
158156
} else {
159157
for ($i = 1; $i <= $this->number_of_pages; $i++) {
160158
$buttons[] = $this->generateButton($i);

tests/InlineKeyboardPaginationTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct()
4141
$this->selected_page = random_int(1, 15);
4242
}
4343

44-
public function test_valid_constructor()
44+
public function testValidConstructor()
4545
{
4646
$ikp = new InlineKeyboardPagination($this->items, $this->command, $this->selected_page, $this->limit);
4747

@@ -57,13 +57,13 @@ public function test_valid_constructor()
5757
/**
5858
* @expectedException \TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException
5959
*/
60-
public function test_invalid_constructor()
60+
public function testInvalidConstructor()
6161
{
6262
$ikp = new InlineKeyboardPagination($this->items, $this->command, 10000, $this->limit);
6363
$ikp->paginate();
6464
}
6565

66-
public function test_valid_paginate()
66+
public function testValidPaginate()
6767
{
6868
$ikp = new InlineKeyboardPagination($this->items, $this->command, $this->selected_page, $this->limit);
6969

@@ -79,7 +79,7 @@ public function test_valid_paginate()
7979
/**
8080
* @expectedException \TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException
8181
*/
82-
public function test_invalid_paginate()
82+
public function testInvalidPaginate()
8383
{
8484
$ikp = new InlineKeyboardPagination($this->items, $this->command, $this->selected_page, $this->limit);
8585

@@ -93,7 +93,7 @@ public function test_invalid_paginate()
9393
/**
9494
* @expectedException \TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException
9595
*/
96-
public function test_invalid_max_buttons()
96+
public function testInvalidMaxButtons()
9797
{
9898
$ikp = new InlineKeyboardPagination(range(1, 240));
9999
$ikp->setMaxButtons(2);
@@ -103,7 +103,7 @@ public function test_invalid_max_buttons()
103103
/**
104104
* @expectedException \TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException
105105
*/
106-
public function test_invalid_selected_page()
106+
public function testInvalidSelectedPage()
107107
{
108108
$ikp = new InlineKeyboardPagination(range(1, 240));
109109
$ikp->setSelectedPage(-5);
@@ -113,7 +113,7 @@ public function test_invalid_selected_page()
113113
/**
114114
* @expectedException \TelegramBot\InlineKeyboardPagination\Exceptions\InlineKeyboardPaginationException
115115
*/
116-
public function test_invalid_wrap_selected_button()
116+
public function testInvalidWrapSelectedButton()
117117
{
118118
$ikp = new InlineKeyboardPagination(range(1, 240));
119119
$ikp->setWrapSelectedButton('$sdlfk$');

0 commit comments

Comments
 (0)