Skip to content

Commit b7303b6

Browse files
alamiraultfabpot
authored andcommitted
Remove usage of empty function when possible
1 parent 2351f1f commit b7303b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

AcceptHeader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function first(): ?AcceptHeaderItem
127127
{
128128
$this->sort();
129129

130-
return !empty($this->items) ? reset($this->items) : null;
130+
return $this->items ? reset($this->items) : null;
131131
}
132132

133133
/**

Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public function __toString(): string
505505
$cookies[] = $k.'='.$v;
506506
}
507507

508-
if (!empty($cookies)) {
508+
if ($cookies) {
509509
$cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n";
510510
}
511511

0 commit comments

Comments
 (0)