Skip to content

Commit 7bae8c3

Browse files
authored
Replace count with not empty
Because not all return values are countable.
1 parent bbe9216 commit 7bae8c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FirebaseMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public function payload()
290290
}
291291

292292
foreach (self::OPTIONS_GETTERS as $function => $arrayKey) {
293-
if (method_exists($this, $function) && count($this->$function())) {
293+
if (method_exists($this, $function) && !empty($this->$function())) {
294294
$payload[$arrayKey] = $this->$function();
295295
}
296296
}
@@ -307,4 +307,4 @@ public function recipientNotGiven()
307307
{
308308
return !$this->recipient;
309309
}
310-
}
310+
}

0 commit comments

Comments
 (0)