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