Skip to content

Commit 09d14d4

Browse files
committed
Allow PHP 7.1 risky fixer
1 parent 3a8dc5f commit 09d14d4

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
'@Symfony' => true,
2121
'@Symfony:risky' => true,
2222
'@PHP71Migration' => true,
23+
'@PHP71Migration:risky' => true,
2324
'header_comment' => array('header' => $header),
2425
'strict_param' => true,
2526
'array_syntax' => ['syntax' => 'short'],

src/Command/CheckerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CheckerCommand extends Command
2323
{
2424
protected static $defaultName = 'checker';
2525

26-
protected function configure()
26+
protected function configure(): void
2727
{
2828
$this
2929
->setDescription('Checks the patched file and displays a summary table.')

src/Command/GeneratePatchCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class GeneratePatchCommand extends Command
2525
{
2626
protected static $defaultName = 'spec:generate-patch';
2727

28-
protected function configure()
28+
protected function configure(): void
2929
{
3030
$this
3131
->setDescription('Generates the patch by comparing Slack\'s official sorted spec to the currently patched one.')

src/Command/UpdateSpecificationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class UpdateSpecificationCommand extends Command
2626
{
2727
protected static $defaultName = 'spec:update';
2828

29-
protected function configure()
29+
protected function configure(): void
3030
{
3131
$this
3232
->setDescription('Downloads a new version of the official Slack OpenAPI file, and applies our patches to it.')

tests/ApiTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
class ApiTest extends TestCase
2222
{
23-
public function testItWorksOnTestSuccess()
23+
public function testItWorksOnTestSuccess(): void
2424
{
2525
$client = ClientFactory::create('');
2626
$response = $client->apiTest();
@@ -29,7 +29,7 @@ public function testItWorksOnTestSuccess()
2929
self::assertTrue($response->getOk());
3030
}
3131

32-
public function testItThrowsExceptionOnTestError()
32+
public function testItThrowsExceptionOnTestError(): void
3333
{
3434
$client = ClientFactory::create('');
3535

tests/ClientTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class ClientTest extends SlackTokenDependentTest
1919
{
20-
public function testItCanIterate()
20+
public function testItCanIterate(): void
2121
{
2222
$client = $this->createClient();
2323

@@ -33,7 +33,7 @@ public function testItCanIterate()
3333
self::assertInstanceOf(ObjsUser::class, $users[0]);
3434
}
3535

36-
public function testItThrowsExceptionOnUnknownIterate()
36+
public function testItThrowsExceptionOnUnknownIterate(): void
3737
{
3838
$client = $this->createClient();
3939

@@ -43,7 +43,7 @@ public function testItThrowsExceptionOnUnknownIterate()
4343
$client->iterateFooBar();
4444
}
4545

46-
public function testItThrowsExceptionOnUnknownMethod()
46+
public function testItThrowsExceptionOnUnknownMethod(): void
4747
{
4848
$client = $this->createClient();
4949

tests/JsonSorterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function setUp(): void
2828
/**
2929
* @dataProvider provideJsonStrings
3030
*/
31-
public function testItCanSortJsonString(string $source, string $expectedResult)
31+
public function testItCanSortJsonString(string $source, string $expectedResult): void
3232
{
3333
$this->sorter->sort($source);
3434
$this->assertSame(

tests/ReadingTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class ReadingTest extends SlackTokenDependentTest
2525
{
26-
public function testItWorksOnUserListWithCorrectToken()
26+
public function testItWorksOnUserListWithCorrectToken(): void
2727
{
2828
$client = $this->createClient();
2929

@@ -35,7 +35,7 @@ public function testItWorksOnUserListWithCorrectToken()
3535
self::assertGreaterThan(2, \count($response->getMembers()));
3636
}
3737

38-
public function testItThrowsExceptionOnUserListWithoutToken()
38+
public function testItThrowsExceptionOnUserListWithoutToken(): void
3939
{
4040
$client = $this->createClient('');
4141

@@ -45,7 +45,7 @@ public function testItThrowsExceptionOnUserListWithoutToken()
4545
$client->usersList();
4646
}
4747

48-
public function testItCanReadAConversationHistory()
48+
public function testItCanReadAConversationHistory(): void
4949
{
5050
$client = $this->createClient();
5151

@@ -73,7 +73,7 @@ public function testItCanReadAConversationHistory()
7373
$this->assertTrue($hadAFileMessage, 'We expect a message in File in the history, cf \JoliCode\Slack\Tests\WritingTest::testItCanUploadFile');
7474
}
7575

76-
public function testItCanGetTheImList()
76+
public function testItCanGetTheImList(): void
7777
{
7878
$client = $this->createClient();
7979

@@ -83,7 +83,7 @@ public function testItCanGetTheImList()
8383
self::assertNotEmpty($results->getChannels());
8484
}
8585

86-
public function testItCanReadConversationsAndHydrateThem()
86+
public function testItCanReadConversationsAndHydrateThem(): void
8787
{
8888
$client = $this->createClient();
8989

@@ -101,7 +101,7 @@ public function testItCanReadConversationsAndHydrateThem()
101101
}
102102
}
103103

104-
public function testItCanGetConversationLocale()
104+
public function testItCanGetConversationLocale(): void
105105
{
106106
$client = $this->createClient();
107107

@@ -118,7 +118,7 @@ public function testItCanGetConversationLocale()
118118
$this->assertNotNull($channel->getLocale());
119119
}
120120

121-
public function testItCanSearchMessages()
121+
public function testItCanSearchMessages(): void
122122
{
123123
$client = $this->createClient();
124124

tests/UserInfoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class UserInfoTest extends SlackTokenDependentTest
1919
{
20-
public function testItCanFetchUserInfo()
20+
public function testItCanFetchUserInfo(): void
2121
{
2222
$client = $this->createClient();
2323

tests/WritingTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class WritingTest extends SlackTokenDependentTest
2121
{
22-
public function testItCanPostAttachment()
22+
public function testItCanPostAttachment(): void
2323
{
2424
$client = $this->createClient();
2525

@@ -42,7 +42,7 @@ public function testItCanPostAttachment()
4242
}
4343
}
4444

45-
public function testItCanPostMessageWithBlock()
45+
public function testItCanPostMessageWithBlock(): void
4646
{
4747
$client = $this->createClient();
4848

@@ -77,7 +77,7 @@ public function testItCanPostMessageWithBlock()
7777
self::assertNotEmpty($response->getMessage()->getBlocks());
7878
}
7979

80-
public function testItCanPostAMessageAndThenAThreadResponse()
80+
public function testItCanPostAMessageAndThenAThreadResponse(): void
8181
{
8282
$client = $this->createClient();
8383

@@ -98,7 +98,7 @@ public function testItCanPostAMessageAndThenAThreadResponse()
9898
$this->assertTrue($response2->getOk());
9999
}
100100

101-
public function testItCanUploadFile()
101+
public function testItCanUploadFile(): void
102102
{
103103
$client = $this->createClient();
104104

@@ -122,7 +122,7 @@ public function testItCanUploadFile()
122122
}
123123
}
124124

125-
public function testScheduleMessage()
125+
public function testScheduleMessage(): void
126126
{
127127
$client = $this->createClient();
128128
$futureTs = (new \DateTime('+1 hour'))->getTimestamp();
@@ -136,7 +136,7 @@ public function testScheduleMessage()
136136
$this->assertTrue($response->getOk());
137137
}
138138

139-
public function testItCanMarkConversation()
139+
public function testItCanMarkConversation(): void
140140
{
141141
$client = $this->createClient();
142142

0 commit comments

Comments
 (0)