public function pass(ClassMethod $methodStmt, Context $context)
{
if ($methodStmt->name == '__get') {
if (count($methodStmt->params) == 0) {
$context->notice('magic_method_parameters', 'Magic method __get must take 1 parameter at least', $methodStmt, Check::CHECK_SAFE);
}
}
if ($methodStmt->name == '__set') {
if (count($methodStmt->params) < 2) {
$context->notice('magic_method_parameters', 'Magic method __set must take 2 parameters at least', $methodStmt, Check::CHECK_SAFE);
}
}
if ($methodStmt->name == '__clone') {
if (count($methodStmt->params) > 0) {
$context->notice('magic_method_parameters', 'Magic method __clone cannot accept arguments', $methodStmt, Check::CHECK_SAFE);
}
}
}