[Configuration] Throw exception creating objects of this class

This class only provides static functions.
This commit is contained in:
logmanoriginal 2018-11-18 15:29:50 +01:00
parent 85685b7758
commit 91f7405297

View file

@ -16,7 +16,6 @@
* *
* This class implements a configuration module for RSS-Bridge. * 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. * @todo Make this class final.
*/ */
class Configuration { class Configuration {
@ -45,6 +44,15 @@ class Configuration {
*/ */
public static $config = null; 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. * Verifies the current installation of RSS-Bridge and PHP.
* *