Skip to content

Commit 18e88bb

Browse files
committed
Fixed flipped statement in Review API
1 parent d674e1d commit 18e88bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Github/Api/PullRequest/Review.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ public function submit($username, $repository, $pullRequest, $id, array $params
165165
*/
166166
public function dismiss($username, $repository, $pullRequest, $id, $message)
167167
{
168-
if (empty($message)) {
168+
if (!is_string($message)) {
169169
throw new InvalidArgumentException(sprintf('"message" must be a valid string ("%s" given).', gettype($message)));
170170
}
171171

172-
if (!is_string($message)) {
172+
if (empty($message)) {
173173
throw new InvalidArgumentException('"message" is mandatory and cannot be empty');
174174
}
175175

0 commit comments

Comments
 (0)