private function overrideAttribs(Tokens $tokens, $memberIndex, array $attribs)
{
$toOverride = array();
$firstAttribIndex = $memberIndex;
foreach ($attribs as $attrib) {
if (null === $attrib) {
continue;
}
if (null !== $attrib['index']) {
$firstAttribIndex = min($firstAttribIndex, $attrib['index']);
}
if (!$attrib['token']->isGivenKind(T_VAR) && '' !== $attrib['token']->getContent()) {
$toOverride[] = $attrib['token'];
$toOverride[] = new Token(array(T_WHITESPACE, ' '));
}
}
if (!empty($toOverride)) {
$tokens->overrideRange($firstAttribIndex, $memberIndex - 1, $toOverride);
}
}