public function getMethodFlags(array $mutation)
{
$reflectionClass = new \ReflectionClass($mutation['class']);
$reflectionMethod = $reflectionClass->getMethod($mutation['method'] . $this->_methodPreserveCode);
$static = null;
$access = null;
if ($reflectionMethod->isPublic()) {
$access = RUNKIT_ACC_PUBLIC;
} elseif ($reflectionMethod->isProtected()) {
$access = RUNKIT_ACC_PROTECTED;
} elseif ($reflectionMethod->isPrivate()) {
$access = RUNKIT_ACC_PRIVATE;
}
if (defined('RUNKIT_ACC_STATIC') && $reflectionMethod->isStatic()) {
$static = RUNKIT_ACC_STATIC;
}
if (!is_null($static)) {
return $access | $static;
}
return $access;
}