Lethexie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/293907

Change subject: Put failed examples and passed examples into a file.
......................................................................

Put failed examples and passed examples into a file.

Change-Id: Ia8b1527d69ae31f42ed0c05d02c3cc4234cb08ec
---
A MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
A MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.expect
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.fixed
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php.expect
A MediaWiki/Tests/files/Commenting/commenting_function.php
A MediaWiki/Tests/files/Commenting/commenting_function.php.expect
A MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php.expect
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php.fixed
D MediaWiki/Tests/files/Commenting/commenting_function_pass.php
D MediaWiki/Tests/files/Commenting/commenting_function_pass.php.expect
A MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php
A 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php.expect
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php.expect
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php.expect
A MediaWiki/Tests/files/ControlStructures/if_else_structure.php
R MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
A MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed
D MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php
D MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.fixed
D MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php
D MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php.expect
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
M 
MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
M 
MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php.expect
M 
MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
A MediaWiki/Tests/files/NamingConventions/case_global_name.php
A MediaWiki/Tests/files/NamingConventions/case_global_name.php.expect
D MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php
D MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.fixed
A MediaWiki/Tests/files/NamingConventions/wf_global_function.php
A MediaWiki/Tests/files/NamingConventions/wf_global_function.php.expect
D MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php
D MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php
D MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php.expect
R MediaWiki/Tests/files/NamingConventions/wf_namespace.php
R MediaWiki/Tests/files/NamingConventions/wf_namespace.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php
D MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.fixed
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.fixed
A MediaWiki/Tests/files/Usage/dir_usage.php
R MediaWiki/Tests/files/Usage/dir_usage.php.expect
A MediaWiki/Tests/files/Usage/dir_usage.php.fixed
D MediaWiki/Tests/files/Usage/dir_usage_fail.php
D MediaWiki/Tests/files/Usage/dir_usage_fail.php.fixed
D MediaWiki/Tests/files/Usage/dir_usage_pass.php
D MediaWiki/Tests/files/Usage/dir_usage_pass.php.expect
A MediaWiki/Tests/files/Usage/goto_usage.php
R MediaWiki/Tests/files/Usage/goto_usage.php.expect
D MediaWiki/Tests/files/Usage/goto_usage_fail.php
D MediaWiki/Tests/files/Usage/goto_usage_pass.php
D MediaWiki/Tests/files/Usage/goto_usage_pass.php.expect
D MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php
D MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.expect
D MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.fixed
D 
MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php
D 
MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php.expect
A MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php
A MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php.expect
D MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php
D 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php
D 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php.expect
R MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php
R 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect
D 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php.expect
A MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php
C MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.expect
A MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.fixed
D MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php
D MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.expect
D MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.fixed
D MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php
D MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php.expect
D MediaWiki/Tests/files/WhiteSpace/short_array_fail.php
D MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.expect
D MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.fixed
D MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php
D 
MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.expect
D 
MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.fixed
D MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php
D 
MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php.expect
A MediaWiki/Tests/files/WhiteSpace/space_before_parens.php
A MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.expect
A MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.fixed
D MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php
D MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.expect
D MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.fixed
D MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php
D MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php.expect
A MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php
A MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect
A MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.fixed
A MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php
A MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.expect
A MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.fixed
D MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php
D MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.expect
D MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.fixed
D MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php
D MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php.expect
D MediaWiki/Tests/files/generic_namespace_pass.php.fixed
115 files changed, 827 insertions(+), 860 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/07/293907/1

diff --git a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
new file mode 100644
index 0000000..a957cfa
--- /dev/null
+++ b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       declare ( ticks = 1 ):
+       echo "foo";
+       enddeclare;
+
+       for ( $i = 0; $i < 5; $i++ ):
+               echo $i;
+       endfor;
+
+       foreach ( [ 1, 2, 3 ] as $i ):
+               echo $i;
+       endforeach;
+
+       $x = 1;
+
+       if ( $x < 2 ):
+               echo $x;
+       endif;
+
+       switch ( $x ):
+               case 2:
+                       echo $x;
+                       break;
+       endswitch;
+
+       while ( $x > 2 ):
+               echo $i;
+       endwhile;
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       declare ( ticks = 1 ) {
+       echo "foo";
+       }
+
+       for ( $i = 0; $i < 5; $i++ ) {
+               echo $i;
+       }
+
+       foreach ( [ 1, 2, 3 ] as $i ) {
+               echo $i;
+       }
+
+       $x = 1;
+
+       if ( $x < 2 ) {
+               echo $x;
+       }
+
+       switch ( $x ) {
+               case 2:
+                       echo $x;
+                       break;
+       }
+
+       while ( $x > 2 ) {
+               echo $i;
+       }
+}
+
+// end passed examples.
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
new file mode 100644
index 0000000..a588cba
--- /dev/null
+++ b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
@@ -0,0 +1,20 @@
+
+FILE: ...r/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
+----------------------------------------------------------------------
+FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
+----------------------------------------------------------------------
+ 10 | WARNING | Alternative syntax such as "enddeclare" should not be
+    |         | used
+ 14 | WARNING | Alternative syntax such as "endfor" should not be
+    |         | used
+ 18 | WARNING | Alternative syntax such as "endforeach" should not be
+    |         | used
+ 24 | WARNING | Alternative syntax such as "endif" should not be used
+ 30 | WARNING | Alternative syntax such as "endswitch" should not be
+    |         | used
+ 34 | WARNING | Alternative syntax such as "endwhile" should not be
+    |         | used
+----------------------------------------------------------------------
+
+Time: 23ms; Memory: 4Mb
+
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php
deleted file mode 100644
index 8ed884b..0000000
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-declare ( ticks = 1 ):
-       echo "foo";
-enddeclare;
-
-for ( $i = 0; $i < 5; $i++ ):
-       echo $i;
-endfor;
-
-foreach ( array( 1, 2, 3 ) as $i ):
-       echo $i;
-endforeach;
-
-$x = 1;
-
-if ( $x < 2 ):
-       echo $x;
-endif;
-
-switch ( $x ):
-       case 2:
-               echo $x;
-               break;
-endswitch;
-
-while ( $x > 2 ):
-       echo $i;
-endwhile;
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.expect 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.expect
deleted file mode 100644
index bc06081..0000000
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.expect
+++ /dev/null
@@ -1,24 +0,0 @@
-
-FILE: ...iaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 6 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------
-  5 | WARNING | [ ] Alternative syntax such as "enddeclare" should
-    |         |     not be used
-  9 | WARNING | [ ] Alternative syntax such as "endfor" should not be
-    |         |     used
- 11 | ERROR   | [x] Short array syntax must be used to define arrays
- 13 | WARNING | [ ] Alternative syntax such as "endforeach" should
-    |         |     not be used
- 19 | WARNING | [ ] Alternative syntax such as "endif" should not be
-    |         |     used
- 25 | WARNING | [ ] Alternative syntax such as "endswitch" should not
-    |         |     be used
- 29 | WARNING | [ ] Alternative syntax such as "endwhile" should not
-    |         |     be used
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 13ms; Memory: 3.5Mb
-
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.fixed 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.fixed
deleted file mode 100644
index 94378f9..0000000
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.fixed
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-declare ( ticks = 1 ):
-       echo "foo";
-enddeclare;
-
-for ( $i = 0; $i < 5; $i++ ):
-       echo $i;
-endfor;
-
-foreach ( [ 1, 2, 3 ] as $i ):
-       echo $i;
-endforeach;
-
-$x = 1;
-
-if ( $x < 2 ):
-       echo $x;
-endif;
-
-switch ( $x ):
-       case 2:
-               echo $x;
-               break;
-endswitch;
-
-while ( $x > 2 ):
-       echo $i;
-endwhile;
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php
deleted file mode 100644
index 1f7be98..0000000
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-declare ( ticks = 1 ) {
-       echo "foo";
-}
-
-for ( $i = 0; $i < 5; $i++ ) {
-       echo $i;
-}
-
-foreach ( [ 1, 2, 3 ] as $i ) {
-       echo $i;
-}
-
-$x = 1;
-
-if ( $x < 2 ) {
-       echo $x;
-}
-
-switch ( $x ) {
-       case 2:
-               echo $x;
-               break;
-}
-
-while ( $x > 2 ) {
-       echo $i;
-}
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php.expect 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php 
b/MediaWiki/Tests/files/Commenting/commenting_function.php
new file mode 100644
index 0000000..6724bd7
--- /dev/null
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php
@@ -0,0 +1,39 @@
+<?php
+
+class TestFailedExamples {
+
+       public function testNoDoc( $testVar ) {
+               return $testVar;
+       }
+
+       /**
+        * @param int $testVar This should start uppercase and end stop.
+        *
+        */
+       public function testNeedReturn( $testVar ) {
+               return $testVar;
+       }
+
+       /**
+        * @param int $testVar  This is test.
+        * @param int $t                For test.
+        * @return int $testVar This is test.
+        */
+       public function testSingleSpaces( $testVar, $t ) {
+               return $testVar;
+       }
+}
+
+class TestPassedExamples {
+
+       /**
+        * Single Test function.
+        *
+        * @param int $testVar For test.
+        * @return int $testVar For test.
+        */
+       public function test( $testVar ) {
+               return $testVar;
+       }
+
+}
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
new file mode 100644
index 0000000..d1c02aa
--- /dev/null
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
@@ -0,0 +1,15 @@
+
+FILE: ...sniffer/MediaWiki/Tests/files/Commenting/commenting_function.php
+----------------------------------------------------------------------
+FOUND 4 ERRORS AFFECTING 4 LINES
+----------------------------------------------------------------------
+  5 | ERROR | [ ] Missing function doc comment
+ 12 | ERROR | [ ] Missing @return tag in function comment
+ 18 | ERROR | [x] Expected 1 spaces after parameter name; 2 found
+ 19 | ERROR | [x] Expected 1 spaces after parameter name; 3 found
+----------------------------------------------------------------------
+PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
+----------------------------------------------------------------------
+
+Time: 20ms; Memory: 3.5Mb
+
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.fixed 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
new file mode 100644
index 0000000..d1e26d5
--- /dev/null
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
@@ -0,0 +1,39 @@
+<?php
+
+class TestFailedExamples {
+
+       public function testNoDoc( $testVar ) {
+               return $testVar;
+       }
+
+       /**
+        * @param int $testVar This should start uppercase and end stop.
+        *
+        */
+       public function testNeedReturn( $testVar ) {
+               return $testVar;
+       }
+
+       /**
+        * @param int $testVar This is test.
+        * @param int $t For test.
+        * @return int $testVar This is test.
+        */
+       public function testSingleSpaces( $testVar, $t ) {
+               return $testVar;
+       }
+}
+
+class TestPassedExamples {
+
+       /**
+        * Single Test function.
+        *
+        * @param int $testVar For test.
+        * @return int $testVar For test.
+        */
+       public function test( $testVar ) {
+               return $testVar;
+       }
+
+}
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php 
b/MediaWiki/Tests/files/Commenting/commenting_function_fail.php
deleted file mode 100644
index 04ad69b..0000000
--- a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-class TestClass {
-
-       // Fail example start.
-
-       public function testNoDoc( $testVar ) {
-               return $testVar;
-       }
-
-       /**
-        * @param int $testVar This should start uppercase and end stop.
-        *
-        */
-       public function testNeedReturn( $testVar ) {
-               return $testVar;
-       }
-       /**
-        * @param int $testVar  This is test.
-        * @param int $t                For test.
-        * @return int $testVar This is test.
-        */
-       public function testSpaces( $testVar, $t ) {
-               return $testVar;
-       }
-
-       // Fail example end.
-}
diff --git 
a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.expect
deleted file mode 100644
index bd36a65..0000000
--- a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.expect
+++ /dev/null
@@ -1,16 +0,0 @@
-
-FILE: ...er/MediaWiki/Tests/files/Commenting/commenting_function_fail.php
-----------------------------------------------------------------------
-FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------
-  7 | ERROR | [ ] You must use "/**" style comments for a function
-    |       |     comment
- 14 | ERROR | [ ] Missing @return tag in function comment
- 19 | ERROR | [x] Expected 1 spaces after parameter name; 2 found
- 20 | ERROR | [x] Expected 1 spaces after parameter name; 3 found
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 18ms; Memory: 3.5Mb
-
diff --git 
a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.fixed 
b/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.fixed
deleted file mode 100644
index c35bed4..0000000
--- a/MediaWiki/Tests/files/Commenting/commenting_function_fail.php.fixed
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-class TestClass {
-
-       // Fail example start.
-
-       public function testNoDoc( $testVar ) {
-               return $testVar;
-       }
-
-       /**
-        * @param int $testVar This should start uppercase and end stop.
-        *
-        */
-       public function testNeedReturn( $testVar ) {
-               return $testVar;
-       }
-       /**
-        * @param int $testVar This is test.
-        * @param int $t For test.
-        * @return int $testVar This is test.
-        */
-       public function testSpaces( $testVar, $t ) {
-               return $testVar;
-       }
-
-       // Fail example end.
-}
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function_pass.php 
b/MediaWiki/Tests/files/Commenting/commenting_function_pass.php
deleted file mode 100644
index a8140b4..0000000
--- a/MediaWiki/Tests/files/Commenting/commenting_function_pass.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-class TestFunctionClass {
-       /**
-        * Single Test function.
-        *
-        * @param  int $testVar For test.
-        * @return int $testVar For test.
-        */
-       public function test( $testVar ) {
-               return $testVar;
-       }
-}
diff --git 
a/MediaWiki/Tests/files/Commenting/commenting_function_pass.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/Commenting/commenting_function_pass.php.expect
+++ /dev/null
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php
new file mode 100644
index 0000000..e5597d6
--- /dev/null
+++ 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       if ( $foo = 1 ) {
+               # code...
+       } elseif ( $foo += 1 ) {
+               # code...
+       } elseif ( $foo *= $bar ) {
+               # code...
+       } elseif ( $foo > 1 || $bar < 1 || $foobar = 1 ) {
+               # code...
+       } elseif ( $bar = $foo->foo() ) {
+               # code...
+       }
+       while ( $foo = foo() ) {
+               # code...
+       }
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       if ( $foo == 1 ) {
+               # code...
+       } elseif ( $foo === 1 ) {
+               # code...
+       } elseif ( $foo === [ 1 => 0 ] ) {
+               # code...
+       } elseif ( $foo > 1 || $bar < 1 ) {
+               # code...
+       } elseif ( $foo <= 1 ) {
+               # code...
+       }
+       while ( $foo !== 1 ) {
+               # code...
+       }
+}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php.expect
 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php.expect
new file mode 100644
index 0000000..dcbc37d
--- /dev/null
+++ 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php.expect
@@ -0,0 +1,15 @@
+
+FILE: ...sts/files/ControlStructures/assignment_in_control_structures.php
+----------------------------------------------------------------------
+FOUND 6 ERRORS AFFECTING 6 LINES
+----------------------------------------------------------------------
+  8 | ERROR | Assignment expression not allowed within "if".
+ 10 | ERROR | Assignment expression not allowed within "elseif".
+ 12 | ERROR | Assignment expression not allowed within "elseif".
+ 14 | ERROR | Assignment expression not allowed within "elseif".
+ 16 | ERROR | Assignment expression not allowed within "elseif".
+ 19 | ERROR | Assignment expression not allowed within "while".
+----------------------------------------------------------------------
+
+Time: 20ms; Memory: 3.75Mb
+
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php
 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php
deleted file mode 100644
index e5a836b..0000000
--- 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-if ( $foo = 1 ) {
-
-} elseif ( $foo += 1 ) {
-
-} elseif ( $foo *= $bar ) {
-
-} elseif ( $foo > 1 || $bar < 1 || $foobar = 1 ) {
-
-} elseif ( $bar = $foo->foo() ) {
-
-}
-
-while ( $foo = foo() ) {
-
-}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php.expect
 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php.expect
deleted file mode 100644
index fc76b42..0000000
--- 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-
-FILE: ...iles/ControlStructures/assignment_in_control_structures_fail.php
-----------------------------------------------------------------------
-FOUND 6 ERRORS AFFECTING 6 LINES
-----------------------------------------------------------------------
-  3 | ERROR | Assignment expression not allowed within "if".
-  5 | ERROR | Assignment expression not allowed within "elseif".
-  7 | ERROR | Assignment expression not allowed within "elseif".
-  9 | ERROR | Assignment expression not allowed within "elseif".
- 11 | ERROR | Assignment expression not allowed within "elseif".
- 15 | ERROR | Assignment expression not allowed within "while".
-----------------------------------------------------------------------
-
-Time: 12ms; Memory: 3.5Mb
-
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php
 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php
deleted file mode 100644
index dbca3c5..0000000
--- 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-if ( $foo == 1 ) {
-
-} elseif ( $foo === 1 ) {
-
-} elseif ( $foo === [ 1 => 0 ] ) {
-
-} elseif ( $foo > 1 || $bar < 1 ) {
-
-} elseif ( $foo <= 1 ) {
-
-}
-
-while ( $foo !== 1 ) {
-
-}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php.expect
 
b/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- 
a/MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/ControlStructures/if_else_structure.php 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php
new file mode 100644
index 0000000..10bc02d
--- /dev/null
+++ b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $a = true;
+       if ( $a ) {
+               # code...
+       }
+       elseif ( $a ) {
+               # code...
+       }
+       else {
+               # code...
+       }
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $a = true;
+       if ( $a ) {
+               # code...
+       } elseif ( $a ) {
+               # code...
+       } else {
+               # code...
+       }
+}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.expect 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
similarity index 64%
rename from 
MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.expect
rename to MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
index 460b38c..8fe274f 100644
--- a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.expect
+++ b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
@@ -1,13 +1,13 @@
 
-FILE: ...diaWiki/Tests/files/ControlStructures/if_else_structure_fail.php
+FILE: ...er/MediaWiki/Tests/files/ControlStructures/if_else_structure.php
 ----------------------------------------------------------------------
 FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
 ----------------------------------------------------------------------
- 11 | WARNING | [x] Single space expected before "elseif"
- 14 | WARNING | [x] Single space expected before "else"
+ 12 | WARNING | [x] Single space expected before "elseif"
+ 15 | WARNING | [x] Single space expected before "else"
 ----------------------------------------------------------------------
 PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
 ----------------------------------------------------------------------
 
-Time: 15ms; Memory: 3.25Mb
+Time: 30ms; Memory: 3.5Mb
 
diff --git 
a/MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed
new file mode 100644
index 0000000..dfaeb30
--- /dev/null
+++ b/MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $a = true;
+       if ( $a ) {
+               # code...
+       } elseif ( $a ) {
+               # code...
+       } else {
+               # code...
+       }
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $a = true;
+       if ( $a ) {
+               # code...
+       } elseif ( $a ) {
+               # code...
+       } else {
+               # code...
+       }
+}
diff --git a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php
deleted file mode 100644
index 9ff1625..0000000
--- a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-/**
- * @param  boolean $a The test boolean.
- * @return void
- */
-function wfFooFoo( $a ) {
-       if ( $a ) {
-
-       }
-       elseif ( $a ) {
-
-       }
-       else {
-
-       }
-}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.fixed 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.fixed
deleted file mode 100644
index 64a734e..0000000
--- a/MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.fixed
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @param  boolean $a The test boolean.
- * @return void
- */
-function wfFooFoo( $a ) {
-       if ( $a ) {
-
-       } elseif ( $a ) {
-
-       } else {
-
-       }
-}
diff --git a/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php
deleted file mode 100644
index 64a734e..0000000
--- a/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @param  boolean $a The test boolean.
- * @return void
- */
-function wfFooFoo( $a ) {
-       if ( $a ) {
-
-       } elseif ( $a ) {
-
-       } else {
-
-       }
-}
diff --git 
a/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php.expect 
b/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php.expect
+++ /dev/null
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
index a9656b2..2267ec2 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
@@ -4,7 +4,7 @@
  * @return void
  */
 function wfFoo() {
-
+       # code...
 }
 ?>
-T<?php //this php open tag will in any case be ignored
+T<?php // this php open tag will in any case be ignored
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
index d9446f0..e3c3c00 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
@@ -1,12 +1,9 @@
 
 FILE: ...les/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
 ----------------------------------------------------------------------
-FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
+FOUND 1 ERROR AFFECTING 1 LINE
 ----------------------------------------------------------------------
-  1 | ERROR   | [ ] Extra character found before first <?
- 10 | WARNING | [x] Single space expected between "//" and comment
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
+ 1 | ERROR | Extra character found before first <?
 ----------------------------------------------------------------------
 
 Time: 15ms; Memory: 3.25Mb
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
index 48654da..2267ec2 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
@@ -4,7 +4,7 @@
  * @return void
  */
 function wfFoo() {
-
+       # code...
 }
 ?>
 T<?php // this php open tag will in any case be ignored
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
index 9502848..3ca7188 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
@@ -4,7 +4,7 @@
  * @return void
  */
 function wfFoo() {
-
+       # code...
 }
 ?>
 T<?php // this php open tag will in any case be ignored
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
index 13d37d3..dc3a0e3 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
@@ -6,5 +6,5 @@
  * @return void
  */
 function wfFoo() {
-
+       # code...
 }
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php.expect
 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php.expect
index f745cec..3e2cd56 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php.expect
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php.expect
@@ -6,5 +6,5 @@
  3 | ERROR | Extra character found before first <?
 ----------------------------------------------------------------------
 
-Time: 12ms; Memory: 3.25Mb
+Time: 16ms; Memory: 3.25Mb
 
diff --git 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
index edf783c..f4264f4 100644
--- 
a/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
+++ 
b/MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
@@ -5,5 +5,5 @@
  * @return void
  */
 function wfFoo() {
-
+       # code...
 }
diff --git a/MediaWiki/Tests/files/NamingConventions/case_global_name.php 
b/MediaWiki/Tests/files/NamingConventions/case_global_name.php
new file mode 100644
index 0000000..8f0273e
--- /dev/null
+++ b/MediaWiki/Tests/files/NamingConventions/case_global_name.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       // The below should have capital after wg
+       global $wgsomething, $LocalInterwikis;
+       $wgsomething = 5;
+       $LocalInterwikis = false;
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       global $wgSomething, $wgLocalInterwikis;
+       $wgSomething = 5;
+       $wgLocalInterwikis = false;
+}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/case_global_name.php.expect 
b/MediaWiki/Tests/files/NamingConventions/case_global_name.php.expect
new file mode 100644
index 0000000..db8851d
--- /dev/null
+++ b/MediaWiki/Tests/files/NamingConventions/case_global_name.php.expect
@@ -0,0 +1,13 @@
+
+FILE: ...fer/MediaWiki/Tests/files/NamingConventions/case_global_name.php
+----------------------------------------------------------------------
+FOUND 2 ERRORS AFFECTING 1 LINE
+----------------------------------------------------------------------
+ 9 | ERROR | Global variable "$wgsomething" should use CamelCase:
+   |       | "$wgWgsomething"
+ 9 | ERROR | Global variable "$LocalInterwikis" is lacking 'wg'
+   |       | prefix. Should be "$wgLocalInterwikis".
+----------------------------------------------------------------------
+
+Time: 36ms; Memory: 3.5Mb
+
diff --git a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php 
b/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php
deleted file mode 100644
index 0671bf8..0000000
--- a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo () {
-       // The below should have capital after wg
-       global $wgsomething;
-       $wgsomething = 5;
-}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.expect 
b/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.expect
deleted file mode 100644
index 293dd10..0000000
--- a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-
-FILE: ...ediaWiki/Tests/files/NamingConventions/case_global_name_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------
- 6 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 8 | ERROR   | [ ] Global variable "$wgsomething" should use
-   |         |     CamelCase: "$wgWgsomething"
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 15ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.fixed 
b/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.fixed
deleted file mode 100644
index 860d25f..0000000
--- a/MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.fixed
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       // The below should have capital after wg
-       global $wgsomething;
-       $wgsomething = 5;
-}
diff --git a/MediaWiki/Tests/files/NamingConventions/wf_global_function.php 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function.php
new file mode 100644
index 0000000..ec5e582
--- /dev/null
+++ b/MediaWiki/Tests/files/NamingConventions/wf_global_function.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function failedExamples() {
+       # code...
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       # code...
+}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_global_function.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function.php.expect
new file mode 100644
index 0000000..5bb4f1f
--- /dev/null
+++ b/MediaWiki/Tests/files/NamingConventions/wf_global_function.php.expect
@@ -0,0 +1,11 @@
+
+FILE: ...r/MediaWiki/Tests/files/NamingConventions/wf_global_function.php
+----------------------------------------------------------------------
+FOUND 1 ERROR AFFECTING 1 LINE
+----------------------------------------------------------------------
+ 7 | ERROR | Global function "failedExamples" is lacking a 'wf'
+   |       | prefix. Should be "wfFailedExamples".
+----------------------------------------------------------------------
+
+Time: 27ms; Memory: 3.25Mb
+
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php
deleted file mode 100644
index 9362217..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function foo() {
-
-}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php.expect
deleted file mode 100644
index 6220dd4..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php.expect
+++ /dev/null
@@ -1,11 +0,0 @@
-
-FILE: ...iaWiki/Tests/files/NamingConventions/wf_global_function_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
- 6 | ERROR | Global function "foo" is lacking a 'wf' prefix. Should
-   |       | be "wfFoo".
-----------------------------------------------------------------------
-
-Time: 14ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php
deleted file mode 100644
index abf159f..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFoo() {
-
-}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/NamingConventions/wf_namespace_pass.php 
b/MediaWiki/Tests/files/NamingConventions/wf_namespace.php
similarity index 64%
rename from MediaWiki/Tests/files/NamingConventions/wf_namespace_pass.php
rename to MediaWiki/Tests/files/NamingConventions/wf_namespace.php
index 8d82faf..4433b6a 100644
--- a/MediaWiki/Tests/files/NamingConventions/wf_namespace_pass.php
+++ b/MediaWiki/Tests/files/NamingConventions/wf_namespace.php
@@ -4,8 +4,9 @@
 
 // Doesn't start with "wf"
 /**
+ * Passed examples.
  * @return void
  */
-function baz() {
+function passedExamples() {
        $a = [];
 }
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wf_namespace_pass.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wf_namespace.php.expect
similarity index 100%
rename from MediaWiki/Tests/files/NamingConventions/wf_namespace_pass.php.expect
rename to MediaWiki/Tests/files/NamingConventions/wf_namespace.php.expect
diff --git a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php
deleted file mode 100644
index 4807899..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo () {
-       // The first global is fine, the second isn't
-       global $wgContLang, $LocalInterwikis;
-       $wgContLang = 'en';
-       $LocalInterwikis = false;
-}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.expect
deleted file mode 100644
index b6c7da1..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-
-FILE: ...MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------
- 6 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 8 | ERROR   | [ ] Global variable "$LocalInterwikis" is lacking 'wg'
-   |         |     prefix. Should be "$wgLocalInterwikis".
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 14ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.fixed 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.fixed
deleted file mode 100644
index ba570f3..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.fixed
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       // The first global is fine, the second isn't
-       global $wgContLang, $LocalInterwikis;
-       $wgContLang = 'en';
-       $LocalInterwikis = false;
-}
diff --git a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php
deleted file mode 100644
index 4ac4c72..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo () {
-       // The below should start with wg...
-       global $someotherglobal;
-       $someotherglobal = 5;
-}
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.expect 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.expect
deleted file mode 100644
index fff8ff3..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-
-FILE: .../MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------
- 6 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 8 | ERROR   | [ ] Global variable "$someotherglobal" is lacking 'wg'
-   |         |     prefix. Should be "$wgSomeotherglobal".
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 15ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.fixed 
b/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.fixed
deleted file mode 100644
index 08fb70a..0000000
--- a/MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.fixed
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       // The below should start with wg...
-       global $someotherglobal;
-       $someotherglobal = 5;
-}
diff --git a/MediaWiki/Tests/files/Usage/dir_usage.php 
b/MediaWiki/Tests/files/Usage/dir_usage.php
new file mode 100644
index 0000000..4a46f8f
--- /dev/null
+++ b/MediaWiki/Tests/files/Usage/dir_usage.php
@@ -0,0 +1,60 @@
+<?php
+
+class FOO extends BAR {
+
+       /**
+        * @return void
+        */
+       function __construct() {
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function dirname( $a ) {
+               return BAR::dirname( __FILE__ );
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function foo( $a ) {
+               return BAR::foo( __FILE__ );
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function bar( $a ) {
+               return BAR::bar( 0 );
+       }
+}
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $tmp = dirname( __FILE__ );
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $foo = FOO();
+
+       $tmp = dirname( __FILE__ . "/.." );
+       $tmp = dirname( joinpaths( __FILE__, ".." ) );
+       $tmp = $foo->dirname( __FILE__ );
+
+       $f = __FILE__;
+       $tmp = dirname( $f );
+       $tmp = dirname( $f . "/.." );
+       $tmp = dirname( joinpaths( $f, ".." ) );
+       $tmp = $foo->dirname( $f );
+}
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect 
b/MediaWiki/Tests/files/Usage/dir_usage.php.expect
similarity index 65%
rename from MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect
rename to MediaWiki/Tests/files/Usage/dir_usage.php.expect
index eba3594..46da7c9 100644
--- a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect
+++ b/MediaWiki/Tests/files/Usage/dir_usage.php.expect
@@ -1,13 +1,13 @@
 
-FILE: ...tools-codesniffer/MediaWiki/Tests/files/Usage/dir_usage_fail.php
+FILE: ...wiki-tools-codesniffer/MediaWiki/Tests/files/Usage/dir_usage.php
 ----------------------------------------------------------------------
 FOUND 1 ERROR AFFECTING 1 LINE
 ----------------------------------------------------------------------
- 3 | ERROR | [x] Use __DIR__ constant instead of calling
-   |       |     dirname(__FILE__)
+ 41 | ERROR | [x] Use __DIR__ constant instead of calling
+    |       |     dirname(__FILE__)
 ----------------------------------------------------------------------
 PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
 ----------------------------------------------------------------------
 
-Time: 11ms; Memory: 3.25Mb
+Time: 39ms; Memory: 3.75Mb
 
diff --git a/MediaWiki/Tests/files/Usage/dir_usage.php.fixed 
b/MediaWiki/Tests/files/Usage/dir_usage.php.fixed
new file mode 100644
index 0000000..f6c19a6
--- /dev/null
+++ b/MediaWiki/Tests/files/Usage/dir_usage.php.fixed
@@ -0,0 +1,60 @@
+<?php
+
+class FOO extends BAR {
+
+       /**
+        * @return void
+        */
+       function __construct() {
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function dirname( $a ) {
+               return BAR::dirname( __FILE__ );
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function foo( $a ) {
+               return BAR::foo( __FILE__ );
+       }
+
+       /**
+        * @param  int $a Just for test.
+        * @return string
+        */
+       function bar( $a ) {
+               return BAR::bar( 0 );
+       }
+}
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $tmp = __DIR__;
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $foo = FOO();
+
+       $tmp = dirname( __FILE__ . "/.." );
+       $tmp = dirname( joinpaths( __FILE__, ".." ) );
+       $tmp = $foo->dirname( __FILE__ );
+
+       $f = __FILE__;
+       $tmp = dirname( $f );
+       $tmp = dirname( $f . "/.." );
+       $tmp = dirname( joinpaths( $f, ".." ) );
+       $tmp = $foo->dirname( $f );
+}
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_fail.php 
b/MediaWiki/Tests/files/Usage/dir_usage_fail.php
deleted file mode 100644
index 0449ea2..0000000
--- a/MediaWiki/Tests/files/Usage/dir_usage_fail.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-$tmp = dirname( __FILE__ );
-echo "Done";
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.fixed 
b/MediaWiki/Tests/files/Usage/dir_usage_fail.php.fixed
deleted file mode 100644
index 79aa52b..0000000
--- a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.fixed
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-$tmp = __DIR__;
-echo "Done";
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_pass.php 
b/MediaWiki/Tests/files/Usage/dir_usage_pass.php
deleted file mode 100644
index 7a2753d..0000000
--- a/MediaWiki/Tests/files/Usage/dir_usage_pass.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-class FOO extends BAR {
-       /**
-        * @return void
-        */
-       function __construct() {
-       }
-       /**
-        * @param  int $a Just for test.
-        * @return string
-        */
-       function dirname( $a ) {
-               return BAR::dirname( __FILE__ );
-       }
-
-       /**
-        * @param  int $a Just for test.
-        * @return string
-        */
-       function foo( $a ) {
-               return BAR::foo( __FILE__ );
-       }
-
-       /**
-        * @param  int $a Just for test.
-        * @return string
-        */
-       function bar( $a ) {
-               return BAR::bar( 0 );
-       }
-}
-
-$foo = FOO();
-
-$tmp = dirname( __FILE__ . "/.." );
-$tmp = dirname( joinpaths( __FILE__, ".." ) );
-$tmp = $foo->dirname( __FILE__ );
-
-$f = __FILE__;
-$tmp = dirname( $f );
-$tmp = dirname( $f . "/.." );
-$tmp = dirname( joinpaths( $f, ".." ) );
-$tmp = $foo->dirname( $f );
-
-echo "Done";
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_pass.php.expect 
b/MediaWiki/Tests/files/Usage/dir_usage_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/Usage/dir_usage_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/Usage/goto_usage.php 
b/MediaWiki/Tests/files/Usage/goto_usage.php
new file mode 100644
index 0000000..5154bd9
--- /dev/null
+++ b/MediaWiki/Tests/files/Usage/goto_usage.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       for ( $i=0; $i < 20; $i++ ) {
+               if ( $i == 15 ) {
+                       goto endloop;
+               }
+       }
+       endloop:
+       echo "Done";
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       for ( $i=0; $i < 20; $i++ ) {
+               if ( $i == 15 ) {
+                       break;
+               }
+       }
+       echo "Done";
+}
diff --git a/MediaWiki/Tests/files/Usage/goto_usage_fail.php.expect 
b/MediaWiki/Tests/files/Usage/goto_usage.php.expect
similarity index 61%
rename from MediaWiki/Tests/files/Usage/goto_usage_fail.php.expect
rename to MediaWiki/Tests/files/Usage/goto_usage.php.expect
index 92d99e3..85d6c57 100644
--- a/MediaWiki/Tests/files/Usage/goto_usage_fail.php.expect
+++ b/MediaWiki/Tests/files/Usage/goto_usage.php.expect
@@ -1,10 +1,10 @@
 
-FILE: ...ools-codesniffer/MediaWiki/Tests/files/Usage/goto_usage_fail.php
+FILE: ...iki-tools-codesniffer/MediaWiki/Tests/files/Usage/goto_usage.php
 ----------------------------------------------------------------------
 FOUND 1 ERROR AFFECTING 1 LINE
 ----------------------------------------------------------------------
- 5 | ERROR | Control statement "goto" must not be used.
+ 10 | ERROR | Control statement "goto" must not be used.
 ----------------------------------------------------------------------
 
-Time: 12ms; Memory: 3.25Mb
+Time: 18ms; Memory: 3.5Mb
 
diff --git a/MediaWiki/Tests/files/Usage/goto_usage_fail.php 
b/MediaWiki/Tests/files/Usage/goto_usage_fail.php
deleted file mode 100644
index 587fad1..0000000
--- a/MediaWiki/Tests/files/Usage/goto_usage_fail.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-for ( $i=0; $i < 20; $i++ ) {
-       if ( $i == 15 ) {
-               goto endloop;
-       }
-}
-endloop:
-echo "Done";
diff --git a/MediaWiki/Tests/files/Usage/goto_usage_pass.php 
b/MediaWiki/Tests/files/Usage/goto_usage_pass.php
deleted file mode 100644
index 5562f98..0000000
--- a/MediaWiki/Tests/files/Usage/goto_usage_pass.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-for ( $i=0; $i < 20; $i++ ) {
-       if ( $i == 15 ) {
-               break;
-       }
-}
-echo "Done";
diff --git a/MediaWiki/Tests/files/Usage/goto_usage_pass.php.expect 
b/MediaWiki/Tests/files/Usage/goto_usage_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/Usage/goto_usage_pass.php.expect
+++ /dev/null
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php 
b/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php
deleted file mode 100644
index 0b3088f..0000000
--- a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo () {
-       // The global variable is not used
-       global $wgSomething;
-}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.expect
 
b/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.expect
deleted file mode 100644
index 74a6fc9..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.expect
+++ /dev/null
@@ -1,14 +0,0 @@
-
-FILE: ...ki/Tests/files/VariableAnalysis/unused_global_variables_fail.php
-----------------------------------------------------------------------
-FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------
- 6 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 8 | WARNING | [ ] Global $wgSomething is never used.
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 15ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.fixed 
b/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.fixed
deleted file mode 100644
index 131052f..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       // The global variable is not used
-       global $wgSomething;
-}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php
 
b/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php
deleted file mode 100644
index f24d01f..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       global $wgSomething;
-       $foo = <<<PHP
-/**
-* foo $wgSomething
-*/
-PHP;
-}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php.expect
 
b/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php
new file mode 100644
index 0000000..7a24b2e
--- /dev/null
+++ b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       // The global variable is not used
+       global $wgSomething;
+}
+
+/**
+ * Passed examples.
+ * @return [type] [description]
+ */
+function wfPassedExamples() {
+       global $wgNothing;
+       // global variable used via heredoc.
+       $foo = <<<PHP
+/**
+* foo $wgNothing
+*/
+PHP;
+       // global variable used directly.
+       $foo = $wgSomething + 2;
+
+       // global variable used via string.
+       $foo = "foo$wgSomething";
+
+}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php.expect 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php.expect
new file mode 100644
index 0000000..da57967
--- /dev/null
+++ b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php.expect
@@ -0,0 +1,10 @@
+
+FILE: ...MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php
+----------------------------------------------------------------------
+FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
+----------------------------------------------------------------------
+ 9 | WARNING | Global $wgSomething is never used.
+----------------------------------------------------------------------
+
+Time: 16ms; Memory: 3.5Mb
+
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php
deleted file mode 100644
index 68e14fd..0000000
--- a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       global $wgSomething;
-       $foo = $wgSomething + 2;
-}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php
 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php
deleted file mode 100644
index 106664f..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfFooFoo() {
-       global $wgSomething;
-       $foo = "foo$wgSomething";
-}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php.expect
 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_quote_string_pass.php.expect
+++ /dev/null
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php
 b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php
similarity index 100%
rename from 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php
rename to 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php.expect 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect
similarity index 100%
rename from 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_pass.php.expect
rename to 
MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php.expect
 
b/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- 
a/MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php
new file mode 100644
index 0000000..7b2ca1f
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $a = 1;
+
+
+       $b = 2;
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $a = 1;
+
+       $b = 2;
+}
diff --git a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.expect
similarity index 63%
copy from MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect
copy to MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.expect
index eba3594..3858b84 100644
--- a/MediaWiki/Tests/files/Usage/dir_usage_fail.php.expect
+++ b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.expect
@@ -1,13 +1,13 @@
 
-FILE: ...tools-codesniffer/MediaWiki/Tests/files/Usage/dir_usage_fail.php
+FILE: ...niffer/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php
 ----------------------------------------------------------------------
 FOUND 1 ERROR AFFECTING 1 LINE
 ----------------------------------------------------------------------
- 3 | ERROR | [x] Use __DIR__ constant instead of calling
-   |       |     dirname(__FILE__)
+ 9 | ERROR | [x] Multiple empty lines should not exist in a row;
+   |       |     found 2 consecutive empty lines
 ----------------------------------------------------------------------
 PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
 ----------------------------------------------------------------------
 
-Time: 11ms; Memory: 3.25Mb
+Time: 32ms; Memory: 3.25Mb
 
diff --git a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.fixed
new file mode 100644
index 0000000..5d0a591
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines.php.fixed
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       $a = 1;
+
+       $b = 2;
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       $a = 1;
+
+       $b = 2;
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php
deleted file mode 100644
index 15b0062..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$a = true;
-
-
-$b = false;
-
-/**
- * @return void
- */
-function wfFoo() {
-       $a = 1;
-
-
-       $b = 2;
-}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.expect
deleted file mode 100644
index 34b1a9e..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-
-FILE: ...r/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php
-----------------------------------------------------------------------
-FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------
-  3 | ERROR | [x] Multiple empty lines should not exist in a row;
-    |       |     found 2 consecutive empty lines
- 12 | ERROR | [x] Multiple empty lines should not exist in a row;
-    |       |     found 2 consecutive empty lines
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 15ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.fixed
deleted file mode 100644
index 4dc1cb9..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_fail.php.fixed
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$a = true;
-
-$b = false;
-
-/**
- * @return void
- */
-function wfFoo() {
-       $a = 1;
-
-       $b = 2;
-}
diff --git a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php
deleted file mode 100644
index 4dc1cb9..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-$a = true;
-
-$b = false;
-
-/**
- * @return void
- */
-function wfFoo() {
-       $a = 1;
-
-       $b = 2;
-}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/multiple_empty_lines_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php 
b/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php
deleted file mode 100644
index 31ad829..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$a = ['faaail'];
-$b = ['faaaail' ];
-$c = [ 'faaaail'];
-$d = [ 'faaaaail', 'faaaaaail'];
diff --git a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.expect
deleted file mode 100644
index f035877..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.expect
+++ /dev/null
@@ -1,16 +0,0 @@
-
-FILE: ...odesniffer/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php
-----------------------------------------------------------------------
-FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------
- 3 | WARNING | [x] Single space expected after opening parenthesis
- 3 | WARNING | [x] Single space expected before closing parenthesis
- 4 | WARNING | [x] Single space expected after opening parenthesis
- 5 | WARNING | [x] Single space expected before closing parenthesis
- 6 | WARNING | [x] Single space expected before closing parenthesis
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 11ms; Memory: 3.25Mb
-
diff --git a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.fixed
deleted file mode 100644
index 5b66eb3..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/short_array_fail.php.fixed
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$a = [ 'faaail' ];
-$b = [ 'faaaail' ];
-$c = [ 'faaaail' ];
-$d = [ 'faaaaail', 'faaaaaail' ];
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php
 
b/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php
deleted file mode 100644
index e790e74..0000000
--- 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-//         a comment with tabs instead of a space
-//
-#              yet another comment with tabs instead of a space.
-#
-//A comment without a space
-#Yup, no spaces.
-
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.expect
 
b/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.expect
deleted file mode 100644
index fb639a2..0000000
--- 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.expect
+++ /dev/null
@@ -1,17 +0,0 @@
-
-FILE: ...s/files/WhiteSpace/space_after_delim_singleline_comment_fail.php
-----------------------------------------------------------------------
-FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-----------------------------------------------------------------------
- 2 | WARNING | [x] Single space expected between "//" and comment
- 3 | WARNING | [ ] Unnecessary empty comment found
- 4 | WARNING | [x] Single space expected between "#" and comment
- 5 | WARNING | [ ] Unnecessary empty comment found
- 6 | WARNING | [x] Single space expected between "//" and comment
- 7 | WARNING | [x] Single space expected between "#" and comment
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 16ms; Memory: 3.5Mb
-
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.fixed
 
b/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.fixed
deleted file mode 100644
index 5562b76..0000000
--- 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_fail.php.fixed
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// a comment with tabs instead of a space
-//
-# yet another comment with tabs instead of a space.
-#
-// A comment without a space
-# Yup, no spaces.
-
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php
 
b/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php
deleted file mode 100644
index 3d4e9b8..0000000
--- 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-// a valid comment.
-# another valid comment.
-/* a comment no warnings would be raised on */
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php.expect
 
b/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- 
a/MediaWiki/Tests/files/WhiteSpace/space_after_delim_singleline_comment_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php
new file mode 100644
index 0000000..690276d
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples () {
+       wfFoo ();
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       wfFoo();
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.expect
new file mode 100644
index 0000000..8b02db3
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.expect
@@ -0,0 +1,15 @@
+
+FILE: ...sniffer/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php
+----------------------------------------------------------------------
+FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
+----------------------------------------------------------------------
+ 7 | WARNING | [x] Space found before opening parenthesis of function
+   |         |     call
+ 8 | WARNING | [x] Space found before opening parenthesis of function
+   |         |     call
+----------------------------------------------------------------------
+PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
+----------------------------------------------------------------------
+
+Time: 33ms; Memory: 3.25Mb
+
diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.fixed
new file mode 100644
index 0000000..4b5ad14
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/space_before_parens.php.fixed
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Failed examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       wfFoo();
+}
+
+/**
+ * Passed examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       wfFoo();
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php
deleted file mode 100644
index bce7b35..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfBar () {
-       wfFoo ();
-       $a = array ();
-}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.expect
deleted file mode 100644
index f3d7c71..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.expect
+++ /dev/null
@@ -1,18 +0,0 @@
-
-FILE: ...er/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------
- 6 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 7 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
- 8 | ERROR   | [x] Short array syntax must be used to define arrays
- 8 | WARNING | [x] Space found before opening parenthesis of function
-   |         |     call
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 16ms; Memory: 3.25Mb
-
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.fixed
deleted file mode 100644
index e8788f7..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_fail.php.fixed
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-/**
- * @return void
- */
-function wfBar() {
-       wfFoo();
-       $a = [];
-}
diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php
deleted file mode 100644
index 1b0898e..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-/**
- * @return void
- */
-function wfBar() {
-       wfFoo();
-       $a = [];
-}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/space_before_parens_pass.php.expect
+++ /dev/null
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php 
b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php
new file mode 100644
index 0000000..f5bde3d
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * Failed Examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       //          a comment with tabs instead of a space
+       //
+       #               yet another comment with tabs instead of a space.
+       #
+       //A comment without a space
+       #Yup, no spaces.
+}
+
+/**
+ * Passed Examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       // a valid comment.
+       # another valid comment.
+       /* a comment no warnings would be raised on */
+}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect
new file mode 100644
index 0000000..97af5de
--- /dev/null
+++ 
b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect
@@ -0,0 +1,17 @@
+
+FILE: ...aWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php
+----------------------------------------------------------------------
+FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
+----------------------------------------------------------------------
+  8 | WARNING | [x] Single space expected between "//" and comment
+  9 | WARNING | [ ] Unnecessary empty comment found
+ 10 | WARNING | [x] Single space expected between "#" and comment
+ 11 | WARNING | [ ] Unnecessary empty comment found
+ 12 | WARNING | [x] Single space expected between "//" and comment
+ 13 | WARNING | [x] Single space expected between "#" and comment
+----------------------------------------------------------------------
+PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
+----------------------------------------------------------------------
+
+Time: 36ms; Memory: 3.25Mb
+
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.fixed
new file mode 100644
index 0000000..126d555
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.fixed
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * Failed Examples.
+ * @return void
+ */
+function wfFailedExamples() {
+       // a comment with tabs instead of a space
+       //
+       # yet another comment with tabs instead of a space.
+       #
+       // A comment without a space
+       # Yup, no spaces.
+}
+
+/**
+ * Passed Examples.
+ * @return void
+ */
+function wfPassedExamples() {
+       // a valid comment.
+       # another valid comment.
+       /* a comment no warnings would be raised on */
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php
new file mode 100644
index 0000000..8828c29
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Failed examples.
+ * @param  int $a Just for test.
+ * @param  int $b Just for test.
+ * @return void
+ */
+function wfFailedExamples( $a, $b ) {
+       $a->foo($b);
+       $a->foo(  $b  );
+       $a->foo(        $b      );
+       $c = array( );
+       $a = [
+               'foo' => 'bar',
+               'foo' => ['bar', 'baz']
+       ];
+}
+
+/**
+ * Passed examples.
+ * @param int $arg For test.
+ * @param int $arg1 For test.
+ * @return void
+ */
+function wfPassedExamples( $arg, $arg1 ) {
+       $foo = [
+               // a comment
+               'foo' => 'bar',
+               // 'foo' => 'baz',
+       ];
+       (int)$arg->bar();
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.expect
new file mode 100644
index 0000000..9985744
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.expect
@@ -0,0 +1,21 @@
+
+FILE: ...esniffer/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php
+----------------------------------------------------------------------
+FOUND 1 ERROR AND 9 WARNINGS AFFECTING 5 LINES
+----------------------------------------------------------------------
+ 10 | WARNING | [x] Single space expected after opening parenthesis
+ 10 | WARNING | [x] Single space expected before closing parenthesis
+ 11 | WARNING | [x] Single space expected after opening parenthesis
+ 11 | WARNING | [x] Single space expected before closing parenthesis
+ 12 | WARNING | [x] Single space expected after opening parenthesis
+ 12 | WARNING | [x] Single space expected before closing parenthesis
+ 13 | ERROR   | [x] Short array syntax must be used to define arrays
+ 13 | WARNING | [x] Unnecessary space found within parentheses
+ 16 | WARNING | [x] Single space expected after opening parenthesis
+ 16 | WARNING | [x] Single space expected before closing parenthesis
+----------------------------------------------------------------------
+PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
+----------------------------------------------------------------------
+
+Time: 18ms; Memory: 3.5Mb
+
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.fixed
new file mode 100644
index 0000000..61d17bd
--- /dev/null
+++ b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis.php.fixed
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Failed examples.
+ * @param  int $a Just for test.
+ * @param  int $b Just for test.
+ * @return void
+ */
+function wfFailedExamples( $a, $b ) {
+       $a->foo( $b );
+       $a->foo( $b );
+       $a->foo( $b );
+       $c = [];
+       $a = [
+               'foo' => 'bar',
+               'foo' => [ 'bar', 'baz' ]
+       ];
+}
+
+/**
+ * Passed examples.
+ * @param int $arg For test.
+ * @param int $arg1 For test.
+ * @return void
+ */
+function wfPassedExamples( $arg, $arg1 ) {
+       $foo = [
+               // a comment
+               'foo' => 'bar',
+               // 'foo' => 'baz',
+       ];
+       (int)$arg->bar();
+}
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php
deleted file mode 100644
index 1e8c389..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @param  int $a Just for test.
- * @param  int $b Just for test.
- * @return void
- */
-function wfFooBar( $a, $b ) {
-       $a->foo($b);
-       $a->foo(  $b  );
-       $a->foo(        $b      );
-       $c = array( );
-}
-
-$a = [
-       'foo' => 'bar',
-       'foo' => ['bar', 'baz'],
-];
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.expect
deleted file mode 100644
index 0166e57..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.expect
+++ /dev/null
@@ -1,21 +0,0 @@
-
-FILE: ...fer/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php
-----------------------------------------------------------------------
-FOUND 1 ERROR AND 9 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------
-  9 | WARNING | [x] Single space expected after opening parenthesis
-  9 | WARNING | [x] Single space expected before closing parenthesis
- 10 | WARNING | [x] Single space expected after opening parenthesis
- 10 | WARNING | [x] Single space expected before closing parenthesis
- 11 | WARNING | [x] Single space expected after opening parenthesis
- 11 | WARNING | [x] Single space expected before closing parenthesis
- 12 | ERROR   | [x] Short array syntax must be used to define arrays
- 12 | WARNING | [x] Unnecessary space found within parentheses
- 17 | WARNING | [x] Single space expected after opening parenthesis
- 17 | WARNING | [x] Single space expected before closing parenthesis
-----------------------------------------------------------------------
-PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
-
-Time: 16ms; Memory: 3.5Mb
-
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.fixed 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.fixed
deleted file mode 100644
index be6996b..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_fail.php.fixed
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @param  int $a Just for test.
- * @param  int $b Just for test.
- * @return void
- */
-function wfFooBar( $a, $b ) {
-       $a->foo( $b );
-       $a->foo( $b );
-       $a->foo( $b );
-       $c = [];
-}
-
-$a = [
-       'foo' => 'bar',
-       'foo' => [ 'bar', 'baz' ],
-];
diff --git a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php
deleted file mode 100644
index 7cbeb54..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @param object $arg Just for test.
- * @param object $arg2 Just for test.
- * @return void
- */
-function wfFooFoo( $arg, $arg2 ) {
-       $foo = [
-               // a comment
-               'foo' => 'bar',
-               // 'foo' => 'baz',
-       ];
-       (int)$arg->bar();
-}
diff --git 
a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php.expect 
b/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php.expect
deleted file mode 100644
index e69de29..0000000
--- a/MediaWiki/Tests/files/WhiteSpace/spacey_parenthesis_pass.php.expect
+++ /dev/null
diff --git a/MediaWiki/Tests/files/generic_namespace_pass.php.fixed 
b/MediaWiki/Tests/files/generic_namespace_pass.php.fixed
deleted file mode 100644
index b172ecf..0000000
--- a/MediaWiki/Tests/files/generic_namespace_pass.php.fixed
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-namespace SomeNamespace;
-
-/**
- * Some comment in a block :D
- *
- * @param boolean $outputtype The type of output.
- * @param int $ts The timestamp.
- * @return null
- */
-function namespacedFunction( $outputtype = true, $ts = 3 ) {
-       if ( is_null( $ts ) ) {
-               return null;
-       } else {
-               return wfTimestamp( $outputtype, $ts );
-       }
-}
-
-class FooBar extends AClass implements SomeInterface {
-       /**
-        * @param  string $word The test word.
-        * @return string
-        */
-       public function feedThePanda( $word ) {
-               return 'something' . 'something else' . $word;
-       }
-
-       /**
-        * @return void
-        */
-       public function makeLegoBlocks() {
-               \SomeNamespace\namespacedFunction( false, 5 );
-       }
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/293907
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8b1527d69ae31f42ed0c05d02c3cc4234cb08ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Lethexie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to