]> git.mxchange.org Git - friendica.git/blobdiff - src/Network/HTTPException.php
Merge pull request #12063 from Quix0r/fixes/type-hints-reformatting
[friendica.git] / src / Network / HTTPException.php
index 1ca6bd36df1e52d6f1de5ede8e26373f239c31aa..7ef1ca9828aca0e93147106f2f12d19cc716e68d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -31,11 +31,21 @@ use Exception;
  */
 abstract class HTTPException extends Exception
 {
-       public $httpdesc    = '';
-       public $explanation = '';
+       protected $httpdesc    = '';
+       protected $explanation = '';
 
-       public function __construct($message = '', Exception $previous = null)
+       public function __construct(string $message = '', Exception $previous = null)
        {
                parent::__construct($message, $this->code, $previous);
        }
+
+       public function getDescription()
+       {
+               return $this->httpdesc;
+       }
+
+       public function getExplanation()
+       {
+               return $this->explanation;
+       }
 }