/**
 * Checks if all constants have phpdocs blocks
 *
 * @param local_moodlecheck_file $file
 * @return array of found errors
 */
function local_moodlecheck_constsdocumented(local_moodlecheck_file $file)
{
    $errors = array();
    foreach ($file->get_constants() as $object) {
        if ($object->phpdocs === false) {
            $errors[] = array('object' => $object->fullname, 'line' => $file->get_line_number($object->tid));
        }
    }
    return $errors;
}