Use typed property for AbstractOauth2Action::$httpClient
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 10 Aug 2022 13:39:23 +0000 (15:39 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 10 Aug 2022 13:39:23 +0000 (15:39 +0200)
wcfsetup/install/files/lib/action/AbstractOauth2Action.class.php

index 427e39b0d49e99a8cdb8a97cda2b3e29fe8fd48a..27baa38271b5c8b2d7784cc420573901d60a73ea 100644 (file)
@@ -32,10 +32,7 @@ abstract class AbstractOauth2Action extends AbstractAction
 
     private const PKCE = self::class . "\0pkce";
 
-    /**
-     * @var ClientInterface
-     */
-    private $httpClient;
+    private ClientInterface $httpClient;
 
     /**
      * @inheritDoc
@@ -55,7 +52,7 @@ abstract class AbstractOauth2Action extends AbstractAction
      */
     protected function getHttpClient(): ClientInterface
     {
-        if (!$this->httpClient) {
+        if (!isset($this->httpClient)) {
             $this->httpClient = HttpFactory::makeClientWithTimeout(5);
         }