diff --git a/Chadicus/Docs/ControlStructures/ElseIfAndElseDeclarationStandard.xml b/Chadicus/Docs/ControlStructures/ElseIfAndElseDeclarationStandard.xml new file mode 100644 index 0000000..b3b337c --- /dev/null +++ b/Chadicus/Docs/ControlStructures/ElseIfAndElseDeclarationStandard.xml @@ -0,0 +1,34 @@ + + + + + + + + + + } else { + // perform action in false case + } +} + ]]> + + + diff --git a/Chadicus/Sniffs/ControlStructures/ElseIfAndElseDeclarationSniff.php b/Chadicus/Sniffs/ControlStructures/ElseIfAndElseDeclarationSniff.php new file mode 100644 index 0000000..ae7b453 --- /dev/null +++ b/Chadicus/Sniffs/ControlStructures/ElseIfAndElseDeclarationSniff.php @@ -0,0 +1,33 @@ +addWarning($error, $stackPtr, 'Discouraged'); + } +}