Anonymous
public text v1 · immutable<?php
function register_class_var_phpdoc_comment_rule()
{
$tokens = array (
'T_VAR',
'T_PRIVATE',
'T_PUBLIC',
'T_PROTECTED',
);
return $tokens;
}
function check_class_var_phpdoc_comment_rule($ptr, $tokens, $file, $line, $col)
{
$check = $tokens[$ptr-2];
if ($check[0] != T_DOC_COMMENT) {
printf("%s:%d:%d:%d:%d:There must be a phpdoc comment for every var\n", $file, $line, $line, $col, $col);
}
}
?>