Skip to content

Commit ab9d667

Browse files
committed
Fix issues (mis)reported by PHPStan
1 parent d22ef10 commit ab9d667

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Container/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ private static function doReportTimers(int $level, bool $includeRunning, $types,
637637
$report[] = implode("\n", $lines);
638638
}
639639

640-
if ($report ?? null) {
640+
if (isset($report)) {
641641
Console::print("\n" . implode("\n\n", $report), $level);
642642
}
643643
}

src/Curler/Curler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ protected function execute(bool $close = true, int $depth = 0): string
10281028
$this->close();
10291029
}
10301030

1031-
if ($cacheKey ?? null) {
1031+
if (isset($cacheKey)) {
10321032
Cache::set(
10331033
$cacheKey,
10341034
[$this->StatusCode, $this->ReasonPhrase, $this->ResponseHeaders, $this->ResponseBody],
@@ -1246,7 +1246,7 @@ private function process(string $method, ?array $query, $data = null, ?string $m
12461246
if ($this->responseContentTypeIs(MimeType::JSON)) {
12471247
$response = json_decode($this->ResponseBody, $this->ObjectAsArray);
12481248

1249-
if ($pager ?? null) {
1249+
if (isset($pager)) {
12501250
$response = $pager->getPage($response, $this)->entities();
12511251
if (array_keys($response) === [0] &&
12521252
(is_array($response[0]) || is_scalar($response[0]))) {

0 commit comments

Comments
 (0)