MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / assertMethodVisibility

Function assertMethodVisibility

examples/laravel/assertions.php:37–42  ·  view source on GitHub ↗
(string $class, string $method, string $expected)

Source from the content-addressed store, hash-verified

35}
36
37function assertMethodVisibility(string $class, string $method, string $expected): void
38{
39 $ref = new ReflectionMethod($class, $method);
40 $actual = $ref->isPublic() ? 'public' : ($ref->isProtected() ? 'protected' : 'private');
41 check("$class::$method() is $expected", $actual === $expected);
42}
43
44function assertMethodReturnType(string $class, string $method, string $expected): void
45{

Callers 1

assertions.phpFile · 0.85

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected