diff --git a/coder_sniffer/Drupal/Sniffs/NamingConventions/ValidEnumCaseSniff.php b/coder_sniffer/Drupal/Sniffs/NamingConventions/ValidEnumCaseSniff.php new file mode 100644 index 00000000..7eca94a7 --- /dev/null +++ b/coder_sniffer/Drupal/Sniffs/NamingConventions/ValidEnumCaseSniff.php @@ -0,0 +1,35 @@ + + */ + public function register() + { + return [T_ENUM_CASE]; + + }//end register() + + +}//end class diff --git a/tests/Drupal/NamingConventions/ValidEnumCaseUnitTest.inc b/tests/Drupal/NamingConventions/ValidEnumCaseUnitTest.inc new file mode 100644 index 00000000..d1819d99 --- /dev/null +++ b/tests/Drupal/NamingConventions/ValidEnumCaseUnitTest.inc @@ -0,0 +1,8 @@ + + */ + protected function getErrorList(string $testFile): array + { + return [ + 5 => 1, + 7 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + protected function getWarningList(string $testFile): array + { + return []; + + }//end getWarningList() + + +}//end class