Skip to content

Commit e9e80aa

Browse files
committed
StaticClass: is not overriding __callStatic()
1 parent d67626f commit e9e80aa

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/StaticClass.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,4 @@ trait StaticClass
2121
private function __construct()
2222
{
2323
}
24-
25-
26-
/**
27-
* Call to undefined static method.
28-
* @throws MemberAccessException
29-
*/
30-
public static function __callStatic(string $name, array $args): mixed
31-
{
32-
Utils\ObjectHelpers::strictStaticCall(static::class, $name);
33-
}
3424
}

tests/Utils/StaticClass.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,3 @@ Assert::exception(
2525
Error::class,
2626
'Call to private TestClass::__construct() from global scope',
2727
);
28-
29-
Assert::exception(
30-
fn() => TestClass::methodA(),
31-
Nette\MemberAccessException::class,
32-
'Call to undefined static method TestClass::methodA(), did you mean method()?',
33-
);

0 commit comments

Comments
 (0)