Skip to content

Commit 44e7757

Browse files
committed
Fixing my bad refactoring
1 parent 0f4b4fe commit 44e7757

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

src/AppBundle/Subscriber/AbstractStatusChangeSubscriber.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,5 @@ protected function parseStatusFromText($body)
4343
return static::$triggerWordToStatus[strtolower(end($matches[1]))];
4444
}
4545
}
46-
47-
protected function isUserAllowedToReview(array $data)
48-
{
49-
return $data['issue']['user']['login'] !== $data['comment']['user']['login'];
50-
}
5146
}
5247

src/AppBundle/Subscriber/StatusChangeByCommentSubscriber.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@ public static function getSubscribedEvents()
5454
GitHubEvents::ISSUE_COMMENT => 'onIssueComment',
5555
);
5656
}
57+
58+
private function isUserAllowedToReview(array $data)
59+
{
60+
return $data['issue']['user']['login'] !== $data['comment']['user']['login'];
61+
}
5762
}

src/AppBundle/Subscriber/StatusChangeByReviewSubscriber.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,9 @@ public static function getSubscribedEvents()
107107
GitHubEvents::PULL_REQUEST => 'onReviewRequested',
108108
);
109109
}
110+
111+
private function isUserAllowedToReview(array $data)
112+
{
113+
return $data['pull_request']['user']['login'] !== $data['review']['user']['login'];
114+
}
110115
}

0 commit comments

Comments
 (0)