From 4b84481e0ad98cbaa57309415a31c9f1154f342e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Thu, 24 Oct 2019 13:36:56 +0200 Subject: [PATCH] Helper: Define as final static class. --- src/Helper.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Helper.php b/src/Helper.php index 8321859..8e9966a 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -5,11 +5,19 @@ namespace Baraja\GitLabApi; -class Helper +final class Helper { private const FORCE_ARRAY = 0b0001; + /** + * @throws \Error + */ + final public function __construct() + { + throw new \Error('Class ' . get_class($this) . ' is static and cannot be instantiated.'); + } + /** * Migrated from Nette/Tracy. * @@ -73,4 +81,4 @@ public static function getLastErrorMessage(): ?string return $return; } -} \ No newline at end of file +}