private function getProperties(PHP_CodeSniffer_File $phpcsFile, array $tokens, array $classToken)
{
$reportedProperties = [];
$findPropertiesStartTokenPointer = $classToken['scope_opener'] + 1;
while (($propertyTokenPointer = $phpcsFile->findNext(T_VARIABLE, $findPropertiesStartTokenPointer, $classToken['scope_closer'])) !== false) {
$visibilityModifiedTokenPointer = TokenHelper::findPreviousEffective($phpcsFile, $propertyTokenPointer - 1);
$visibilityModifiedToken = $tokens[$visibilityModifiedTokenPointer];
if ($visibilityModifiedToken['code'] !== T_PRIVATE) {
$findPropertiesStartTokenPointer = $propertyTokenPointer + 1;
continue;
}
$findPropertiesStartTokenPointer = $propertyTokenPointer + 1;
$phpDocTags = $this->getPhpDocTags($phpcsFile, $tokens, $visibilityModifiedTokenPointer);
foreach ($phpDocTags as $tag) {
preg_match('#([@a-zA-Z\\\\]+)#', $tag, $matches);
if (in_array($matches[1], $this->getAlwaysUsedPropertiesAnnotations(), true)) {
continue 2;
}
}
$propertyToken = $tokens[$propertyTokenPointer];
$name = substr($propertyToken['content'], 1);
foreach ($this->getAlwaysUsedPropertiesSuffixes() as $prefix) {
if (StringHelper::endsWith($name, $prefix)) {
continue 2;
}
}
$reportedProperties[$name] = $propertyTokenPointer;
}
return $reportedProperties;
}