/** * Process the category tag. * * @param int $errorPos The line number where the error occurs. * * @return void */ protected function processCategory($errorPos) { $category = $this->commentParser->getCategory(); if ($category !== null) { $content = $category->getContent(); if ($content !== '') { if (PHP_CodeSniffer::isUnderscoreName($content) !== true) { // $newContent = str_replace(' ', '_', $content); // $nameBits = explode('_', $newContent); // $firstBit = array_shift($nameBits); // $newName = ucfirst($firstBit).'_'; // foreach ($nameBits as $bit) { // $newName .= ucfirst($bit).'_'; // } // // $error = 'Category name "%s" is not valid; consider "%s" instead'; // $validName = trim($newName, '_'); // $data = array( // $content, // $validName, // ); // $this->currentFile->addError($error, $errorPos, 'InvalidCategory', $data); } } else { $error = '@category tag must contain a name'; $this->currentFile->addError($error, $errorPos, 'EmptyCategory'); } } }