Completed
Pull Request — develop (#1492)
by Zack
28:58 queued 09:00
created
src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @return string[]
24 24
      */
25
-    protected function getTestFiles($testFileBase)
25
+    protected function getTestFiles( $testFileBase )
26 26
     {
27
-        $testFiles = [$testFileBase.'1.inc'];
27
+        $testFiles = [ $testFileBase . '1.inc' ];
28 28
 
29 29
         $aspTags = false;
30
-        if (PHP_VERSION_ID < 70000) {
31
-            $aspTags = (bool) ini_get('asp_tags');
30
+        if ( PHP_VERSION_ID < 70000 ) {
31
+            $aspTags = (bool)ini_get( 'asp_tags' );
32 32
         }
33 33
 
34
-        if ($aspTags === true) {
35
-            $testFiles[] = $testFileBase.'2.inc';
34
+        if ( $aspTags === true ) {
35
+            $testFiles[ ] = $testFileBase . '2.inc';
36 36
         } else {
37
-            $testFiles[] = $testFileBase.'3.inc';
37
+            $testFiles[ ] = $testFileBase . '3.inc';
38 38
         }
39 39
 
40 40
         return $testFiles;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return array<int, int>
54 54
      */
55
-    public function getErrorList($testFile='')
55
+    public function getErrorList( $testFile = '' )
56 56
     {
57
-        switch ($testFile) {
57
+        switch ( $testFile ) {
58 58
         case 'DisallowAlternativePHPTagsUnitTest.1.inc':
59 59
             return [
60 60
                 4  => 1,
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 5 => 1,
71 71
             ];
72 72
         default:
73
-            return [];
73
+            return [ ];
74 74
         }//end switch
75 75
 
76 76
     }//end getErrorList()
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return array<int, int>
88 88
      */
89
-    public function getWarningList($testFile='')
89
+    public function getWarningList( $testFile = '' )
90 90
     {
91
-        if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
91
+        if ( $testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc' ) {
92 92
             return [
93 93
                 3 => 1,
94 94
                 4 => 1,
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             ];
98 98
         }
99 99
 
100
-        return [];
100
+        return [ ];
101 101
 
102 102
     }//end getWarningList()
103 103
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,51 +1,51 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // True
4
-function myFunction($arg1, $arg2=true)
4
+function myFunction( $arg1, $arg2 = true )
5 5
 {
6 6
 }
7
-function myFunction($arg1, $arg2=TRUE)
7
+function myFunction( $arg1, $arg2 = TRUE )
8 8
 {
9 9
 }
10
-function myFunction($arg1, $arg2=True)
10
+function myFunction( $arg1, $arg2 = True )
11 11
 {
12 12
 }
13 13
 
14
-if ($variable === true) { }
15
-if ($variable === TRUE) { }
16
-if ($variable === True) { }
14
+if ( $variable === true ) { }
15
+if ( $variable === TRUE ) { }
16
+if ( $variable === True ) { }
17 17
 
18 18
 
19 19
 // False
20
-function myFunction($arg1, $arg2=false)
20
+function myFunction( $arg1, $arg2 = false )
21 21
 {
22 22
 }
23
-function myFunction($arg1, $arg2=FALSE)
23
+function myFunction( $arg1, $arg2 = FALSE )
24 24
 {
25 25
 }
26
-function myFunction($arg1, $arg2=False)
26
+function myFunction( $arg1, $arg2 = False )
27 27
 {
28 28
 }
29 29
 
30
-if ($variable === false) { }
31
-if ($variable === FALSE) { }
32
-if ($variable === False) { }
30
+if ( $variable === false ) { }
31
+if ( $variable === FALSE ) { }
32
+if ( $variable === False ) { }
33 33
 
34 34
 
35 35
 // Null
36
-function myFunction($arg1, $arg2=null)
36
+function myFunction( $arg1, $arg2 = null )
37 37
 {
38 38
 }
39
-function myFunction($arg1, $arg2=NULL)
39
+function myFunction( $arg1, $arg2 = NULL )
40 40
 {
41 41
 }
42
-function myFunction($arg1, $arg2=Null)
42
+function myFunction( $arg1, $arg2 = Null )
43 43
 {
44 44
 }
45 45
 
46
-if ($variable === null) { }
47
-if ($variable === NULL) { }
48
-if ($variable === Null) { }
46
+if ( $variable === null ) { }
47
+if ( $variable === NULL ) { }
48
+if ( $variable === Null ) { }
49 49
 
50 50
 $x = new stdClass();
51 51
 $x->NULL = 7;
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 {
64 64
     public function myFunction()
65 65
     {
66
-        $var = array('foo' => new True());
66
+        $var = array( 'foo' => new True() );
67 67
     }
68 68
 }
69 69
 
70
-$x = $f?FALSE:true;
71
-$x = $f? FALSE:true;
70
+$x = $f ?FALSE:true;
71
+$x = $f ? FALSE:true;
72 72
 
73 73
 class MyClass
74 74
 {
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
     const TRUE = false;
77 77
 }
78 78
 
79
-var_dump(MyClass::TRUE);
79
+var_dump( MyClass::TRUE );
80 80
 
81 81
 function tRUE() {}
82 82
 
83
-$input->getFilterChain()->attachByName('Null', ['type' => Null::TYPE_STRING]);
83
+$input->getFilterChain()->attachByName( 'Null', [ 'type' => Null::TYPE_STRING ] );
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc 1 patch
Spacing   +2 added lines, -20 removed lines patch added patch discarded remove patch
@@ -19,25 +19,7 @@
 block discarded – undo
19 19
 <?php
20 20
 
21 21
 // Break the tokenizer.
22
-<<<<<<< HEAD
22
+<< << <<< HEAD
23 23
 $a = 1;
24 24
 =======
25
-$a = 2;
26
->>>>>>> master
27
-
28
-/*
29
- * The above tests are based on "normal" tokens.
30
- * The below test checks that once the tokenizer breaks down because of
31
- * unexpected merge conflict boundaries - i.e. after the first merge conflict
32
- * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent
33
- * merge conflict boundaries will still be detected correctly.
34
- */
35
-?>
36
-
37
-<div class="abc">
38
-<<<<<<< HEAD
39
-	<p id="test-this">Testing a merge conflict.</p>
40
-=======
41
-	<p id="test-that">Another text string.</p>
42
->>>>>>> ref/heads/feature-branch
43
-</div>
25
+$a
44 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc 1 patch
Spacing   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 =======
23 23
 should also be detected.
24 24
 EOT;
25
->>>>>>> ref/heads/other-branchname
25
+>> >> >> > ref / heads / other - branchname
26 26
 
27 27
 // Merge conflict starter outside with a closer inside of the heredoc.
28 28
 // This breaks the tokenizer.
29
-<<<<<<< HEAD
29
+<< << <<< HEAD
30 30
 $string =
31 31
 <<<EOT
32 32
 Merge conflicts in heredocs
@@ -64,8 +64,4 @@  discard block
 block discarded – undo
64 64
 <<<<<<< HEAD
65 65
 can be problematic.
66 66
 EOD;
67
-$a = 1;
68
-=======
69
-should also be detected.
70
-EOT;
71
->>>>>>> ref/heads/other-branchname
67
+$a
72 68
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @return array<int, int>
27 27
      */
28
-    public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc')
28
+    public function getErrorList( $testFile = 'GitMergeConflictUnitTest.1.inc' )
29 29
     {
30
-        switch ($testFile) {
30
+        switch ( $testFile ) {
31 31
         case 'GitMergeConflictUnitTest.1.inc':
32 32
             return [
33 33
                 26 => 1,
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             ];
137 137
 
138 138
         default:
139
-            return [];
139
+            return [ ];
140 140
         }//end switch
141 141
 
142 142
     }//end getErrorList()
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getWarningList()
154 154
     {
155
-        return [];
155
+        return [ ];
156 156
 
157 157
     }//end getWarningList()
158 158
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc 1 patch
Spacing   +1 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,13 +22,4 @@
 block discarded – undo
22 22
  * merge conflict boundaries will still be detected correctly.
23 23
  */
24 24
 
25
-$string =
26
-		<<<"EOD"
27
-		Merge conflicts in PHP 7.3 indented heredocs
28
-<<<<<<< HEAD
29
-		can be problematic.
30
-=======
31
-		should also be detected.
32
->>>>>>> ref/heads/other-branchname
33
-		And now they are.
34
-		EOD;
25
+$string
35 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc 1 patch
Spacing   +2 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 <<<<<<< HEAD
15 15
  * @var string $bar
16 16
  */
17
-public function foo($bar){ }
17
+public function foo( $bar ) { }
18 18
 
19 19
 /*
20 20
 =======
@@ -23,9 +23,4 @@  discard block
 block discarded – undo
23 23
 */
24 24
 
25 25
 // Comment
26
-<<<<<<< HEAD
27
-// Second comment line. NOTE: The above opener breaks the tokenizer.
28
-=======
29
-// New second comment line
30
->>>>>>> master
31
-// Third comment line
26
+<< << <<< HEAD
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc 1 patch
Spacing   +2 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 EOD;
13 13
 
14 14
 // Break the tokenizer.
15
-<<<<<<< HEAD
15
+<< << <<< HEAD
16 16
 
17 17
 /*
18 18
  * The above tests are based on "normal" tokens.
@@ -22,13 +22,4 @@  discard block
 block discarded – undo
22 22
  * merge conflict boundaries will still be detected correctly.
23 23
  */
24 24
 
25
-$string =
26
-<<<'EOD'
27
-can be problematic.
28
-<<<<<<< HEAD
29
-were previously not detected.
30
-=======
31
-should also be detected.
32
->>>>>>> ref/heads/other-branchname
33
-And now they are.
34
-EOD;
25
+$string
35 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getErrorList()
40 40
     {
41
-        return [];
41
+        return [ ];
42 42
 
43 43
     }//end getErrorList()
44 44
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getWarningList()
55 55
     {
56
-        return [];
56
+        return [ ];
57 57
 
58 58
     }//end getWarningList()
59 59
 
Please login to merge, or discard this patch.