public function report_on($flag)
{
if ($this->check(OPT_ONLY_SECURITY)) {
if ($flag[0] == 'S' || in_array($flag, array('I2', 'I3'))) {
return true;
}
return false;
}
switch ($flag[0]) {
case 'C':
return !$this->check(OPT_NO_CONVENTION);
case 'W':
return !$this->check(OPT_NO_WARNING);
case 'P':
return !$this->check(OPT_NO_DEPRECATED);
case 'R':
return !$this->check(OPT_NO_REFACTOR);
case 'E':
return !$this->check(OPT_NO_ERROR);
case 'I':
return !$this->check(OPT_NO_INFORMATION);
case 'D':
return !$this->check(OPT_NO_DOCUMENTATION);
case 'S':
return !$this->check(OPT_NO_SECURITY);
case 'F':
return !$this->check(OPT_NO_FORMATTING);
}
}