Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Feb 9, 2022
1 parent fa2b3e6 commit 9ee4863
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Variable \\$curlHandle might not be defined\\.$#"
count: 2
path: src/Client.php

-
message: "#^Variable \\$success might not be defined\\.$#"
count: 1
path: src/Client.php

-
message: "#^Function base_path not found\\.$#"
count: 1
Expand Down
8 changes: 6 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function performAvailabilityCheck(): bool

static::$cache[$this->fingerprint] = [$success, $expiresAt];
} finally {
curl_close($curlHandle);
if (isset($curlHandle)) {
curl_close($curlHandle);
}

return $success ?? false;
}
Expand Down Expand Up @@ -83,7 +85,9 @@ public function send(Request $request): void
// do nothing for now
}
} finally {
curl_close($curlHandle);
if (isset($curlHandle)) {
curl_close($curlHandle);
}
}
}

Expand Down

0 comments on commit 9ee4863

Please sign in to comment.