Skip to content

Commit 4b84481

Browse files
authored
Helper: Define as final static class.
1 parent 1035c9f commit 4b84481

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Helper.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,19 @@
55
namespace Baraja\GitLabApi;
66

77

8-
class Helper
8+
final class Helper
99
{
1010

1111
private const FORCE_ARRAY = 0b0001;
1212

13+
/**
14+
* @throws \Error
15+
*/
16+
final public function __construct()
17+
{
18+
throw new \Error('Class ' . get_class($this) . ' is static and cannot be instantiated.');
19+
}
20+
1321
/**
1422
* Migrated from Nette/Tracy.
1523
*
@@ -73,4 +81,4 @@ public static function getLastErrorMessage(): ?string
7381
return $return;
7482
}
7583

76-
}
84+
}

0 commit comments

Comments
 (0)