Skip to content

Commit fa5c8be

Browse files
committed
StaticClass: constructor is private [Closes nette/di#292]
- ReflectionClass::isInstance() returns false - it is marked as an error in the IDE
1 parent 96f462d commit fa5c8be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/StaticClass.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
trait StaticClass
1717
{
1818
/**
19-
* @return never
20-
* @throws \Error
19+
* Class is static and cannot be instantiated.
2120
*/
22-
final public function __construct()
21+
final private function __construct()
2322
{
24-
throw new \Error('Class ' . static::class . ' is static and cannot be instantiated.');
2523
}
2624

2725

0 commit comments

Comments
 (0)