diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-11-20 20:52:54 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-03-25 18:47:38 +0100 |
commit | 2baa7a2b9136d4d4dc1e56dfc043cc71da3ee1df (patch) | |
tree | d8f970ce85442869ad9547f80f70153a31820563 /lib/Config/FetcherConfig.php | |
parent | 8b519cd234b1293e03ef288617287be1a30cfc75 (diff) |
Make PHPstan stricter
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Config/FetcherConfig.php')
-rw-r--r-- | lib/Config/FetcherConfig.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Config/FetcherConfig.php b/lib/Config/FetcherConfig.php index 7c3e5f3d1..ce2e7db8d 100644 --- a/lib/Config/FetcherConfig.php +++ b/lib/Config/FetcherConfig.php @@ -84,7 +84,7 @@ class FetcherConfig $url = new \Net_URL2($proxy); $creds = $config->getSystemValue('proxyuserpwd', null); - if ($creds) { + if ($creds !== null) { $auth = explode(':', $creds, 2); $url->setUserinfo($auth[0], $auth[1]); } @@ -106,10 +106,10 @@ class FetcherConfig 'headers' => ['User-Agent' => static::DEFAULT_USER_AGENT, 'Accept' => static::DEFAULT_ACCEPT], ]; - if (!empty($this->proxy)) { + if (!is_null($this->proxy)) { $config['proxy'] = $this->proxy; } - if (!empty($this->redirects)) { + if (!is_null($this->redirects)) { $config['redirect.max'] = $this->redirects; } |