<commit_before><?php
/**
 * Generic_Sniffs_PHP_LowerCaseConstantSniff.
 *
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */
class drupalcs_Sniffs_PHP_UpperCaseConstantSniff extends Generic_Sniffs_PHP_LowerCaseConstantSniff {

    /**
     * Processes this sniff, when one of its tokens is encountered.
     */
    public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
    {
        $tokens = $phpcsFile->getTokens();

        $keyword = $tokens[$stackPtr]['content'];
        if (strtoupper($keyword) !== $keyword) {
            $error = 'TRUE, FALSE and NULL must be uppercase; expected "%s" but found "%s"';
            $data  = array(
                      strtoupper($keyword),
                      $keyword,
                     );
            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
        }

    }
}

?><commit_msg>Cosmetic fixes<commit_after><?php
/**
 * Generic_Sniffs_PHP_LowerCaseConstantSniff.
 *
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */
class drupalcs_Sniffs_PHP_UpperCaseConstantSniff extends Generic_Sniffs_PHP_LowerCaseConstantSniff {

  /**
   * Processes this sniff, when one of its tokens is encountered.
   */
  public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) {
    $tokens = $phpcsFile->getTokens();

    $keyword = $tokens[$stackPtr]['content'];
    if (strtoupper($keyword) !== $keyword) {
      $error = 'TRUE, FALSE and NULL must be uppercase; expected "%s" but found "%s"';
      $data  = array(strtoupper($keyword), $keyword);
      $phpcsFile->addError($error, $stackPtr, 'Found', $data);
    }
  }
}

?>
{'fraction_non_alphanumeric': 0.13411619283065512, 'fraction_numerical': 0.0, 'mean_word_length': 3.027363184079602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4652882', 'n_tokens_mistral': 508, 'n_tokens_neox': 506, 'n_words': 102}