From 91f74052975b103ffba2e4e53da3f24cd52b4abd Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 18 Nov 2018 15:29:50 +0100 Subject: [PATCH] [Configuration] Throw exception creating objects of this class This class only provides static functions. --- lib/Configuration.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Configuration.php b/lib/Configuration.php index 2f17922e..2a4cdb3f 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -16,7 +16,6 @@ * * This class implements a configuration module for RSS-Bridge. * - * @todo Throw an exception if the caller tries to create objects of this class. * @todo Make this class final. */ class Configuration { @@ -45,6 +44,15 @@ class Configuration { */ public static $config = null; + /** + * Throw an exception when trying to create a new instance of this class. + * + * @throws \LogicException if called. + */ + public function __construct(){ + throw new \LogicException('Can\'t create object of this class!'); + } + /** * Verifies the current installation of RSS-Bridge and PHP. *