Skip to content

Commit

Permalink
Uses count instead of empty as it is not recommended in PHP 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Jul 30, 2019
1 parent 2103c60 commit e2ff81a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Zipkin/Reporters/Http.php
Expand Up @@ -45,9 +45,10 @@ public function __construct(
*/
public function report(array $spans)
{
if(empty($spans)){
if (count($spans) === 0) {
return;
}

$payload = json_encode(array_map(function (Span $span) {
return $span->toArray();
}, $spans));
Expand Down

0 comments on commit e2ff81a

Please sign in to comment.