Skip to content

Commit 93a8698

Browse files
committed
Minor fixes
1 parent 28d9863 commit 93a8698

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Issues/GitHub/MilestonesApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function updateMilestone(Repository $repository, int $issueNumber, string
7070
/**
7171
* @return bool
7272
*/
73-
public function exits(Repository $repository, string $milestoneName)
73+
public function exists(Repository $repository, string $milestoneName)
7474
{
7575
foreach ($this->getMilestones($repository) as $milestone) {
7676
if ($milestone['name'] === $milestoneName) {

src/Subscriber/MilestoneNewPRSubscriber.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function onPullRequest(GitHubEvent $event)
3131
{
3232
$data = $event->getData();
3333
$repository = $event->getRepository();
34-
if ('opened' !== $action = $data['action']) {
34+
if ('opened' !== $data['action']) {
3535
return;
3636
}
3737

@@ -40,7 +40,7 @@ public function onPullRequest(GitHubEvent $event)
4040
return;
4141
}
4242

43-
if (!$this->milestonesApi->exits($repository, $targetBranch)) {
43+
if (!$this->milestonesApi->exists($repository, $targetBranch)) {
4444
return;
4545
}
4646

tests/Subscriber/MilestoneNewPRSubscriberTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp()
3939
public function testOnPullRequestOpen()
4040
{
4141
$this->milestonesApi->expects($this->once())
42-
->method('exits')
42+
->method('exists')
4343
->with($this->repository, '4.4')
4444
->willReturn(true);
4545

@@ -90,7 +90,7 @@ public function testOnPullRequestOpenDefaultBranch()
9090
public function testOnPullRequestOpenMilestoneNotExist()
9191
{
9292
$this->milestonesApi->expects($this->once())
93-
->method('exits')
93+
->method('exists')
9494
->with($this->repository, '4.4')
9595
->willReturn(false);
9696

0 commit comments

Comments
 (0)