Completed
Pull Request — master (#7)
by Tomáš
09:48 queued 03:17
created
src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                     54 => 1,
65 65
                     70 => 1,
66 66
                     71 => 1,
67
-                   );
67
+                    );
68 68
         }
69 69
 
70 70
         return array(
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 275 => 1,
103 103
                 300 => 1,
104 104
                 305 => 1,
105
-               );
105
+                );
106 106
 
107 107
     }//end getErrorList()
108 108
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='FunctionCallSignatureUnitTest.inc')
45
+    public function getErrorList($testFile = 'FunctionCallSignatureUnitTest.inc')
46 46
     {
47 47
         if ($testFile === 'FunctionCallSignatureUnitTest.js') {
48 48
             return array(
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 public function someFunctionWithAVeryLongName($firstParameter='something',
3
-   $secondParameter='booooo', $third=null, $fourthParameter=false,
4
-     $fifthParameter=123.12, $sixthParam=true
3
+    $secondParameter='booooo', $third=null, $fourthParameter=false,
4
+        $fifthParameter=123.12, $sixthParam=true
5 5
 ){
6 6
 }
7 7
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
     $url,
66 66
     $requireScheme=TRUE,
67 67
     array $allowedSchemes=array(
68
-                           'http',
69
-                           'https',
70
-                          ),
68
+                            'http',
69
+                            'https',
70
+                            ),
71 71
     array $notAllowedSchemes=array('ftp', 'sftp')
72 72
 ) {
73 73
 }
Please login to merge, or discard this patch.
Spacing   +28 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2
-public function someFunctionWithAVeryLongName($firstParameter='something',
3
-   $secondParameter='booooo', $third=null, $fourthParameter=false,
4
-     $fifthParameter=123.12, $sixthParam=true
5
-){
2
+public function someFunctionWithAVeryLongName($firstParameter = 'something',
3
+   $secondParameter = 'booooo', $third = null, $fourthParameter = false,
4
+     $fifthParameter = 123.12, $sixthParam = true
5
+) {
6 6
 }
7 7
 
8
-function someFunctionWithAVeryLongName2($firstParameter='something',
9
-$secondParameter='booooo', $third=null, $fourthParameter=false,
10
-$fifthParameter=123.12, $sixthParam=true
11
-)  {
8
+function someFunctionWithAVeryLongName2($firstParameter = 'something',
9
+$secondParameter = 'booooo', $third = null, $fourthParameter = false,
10
+$fifthParameter = 123.12, $sixthParam = true
11
+) {
12 12
 }
13 13
 
14 14
 function blah() {
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
 class MyClass
22 22
 {
23 23
 
24
-    public function someFunctionWithAVeryLongName($firstParameter='something',
25
-        $secondParameter='booooo', $third=null, $fourthParameter=false,
26
-        $fifthParameter=123.12, $sixthParam=true
24
+    public function someFunctionWithAVeryLongName($firstParameter = 'something',
25
+        $secondParameter = 'booooo', $third = null, $fourthParameter = false,
26
+        $fifthParameter = 123.12, $sixthParam = true
27 27
     ) /** w00t */ {
28 28
     }
29 29
 
30 30
     public function someFunctionWithAVeryLongName2(
31
-        $firstParameter='something', $secondParameter='booooo', $third=null
31
+        $firstParameter = 'something', $secondParameter = 'booooo', $third = null
32 32
     ) {
33 33
     }
34 34
 
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 }
47 47
 
48 48
 function getInstalledStandards(
49
-    $includeGeneric=false,
50
-    $standardsDir=''
49
+    $includeGeneric = false,
50
+    $standardsDir = ''
51 51
 )
52 52
 {
53 53
 }
@@ -63,27 +63,27 @@  discard block
 block discarded – undo
63 63
 
64 64
 function validateUrl(
65 65
     $url,
66
-    $requireScheme=TRUE,
67
-    array $allowedSchemes=array(
66
+    $requireScheme = TRUE,
67
+    array $allowedSchemes = array(
68 68
                            'http',
69 69
                            'https',
70 70
                           ),
71
-    array $notAllowedSchemes=array('ftp', 'sftp')
71
+    array $notAllowedSchemes = array('ftp', 'sftp')
72 72
 ) {
73 73
 }
74 74
 
75 75
 function validateUrlShort(
76 76
     $url,
77
-    $requireScheme=TRUE,
78
-    array $allowedSchemes=[
77
+    $requireScheme = TRUE,
78
+    array $allowedSchemes = [
79 79
         'http',
80 80
         'https',
81 81
     ],
82
-    array $notAllowedSchemes=['ftp', 'sftp']
82
+    array $notAllowedSchemes = ['ftp', 'sftp']
83 83
 ) {
84 84
 }
85 85
 
86
-$noArgs_longVars = function () use (
86
+$noArgs_longVars = function() use (
87 87
     $longVar1,
88 88
     $longerVar2,
89 89
     $muchLongerVar3
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     // body
92 92
 };
93 93
 
94
-$longArgs_longVars = function (
94
+$longArgs_longVars = function(
95 95
     $longArgument,
96 96
     $longerArgument,
97 97
     $muchLongerArgument
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     // body
104 104
 };
105 105
 
106
-$longArgs_longVars = function (
106
+$longArgs_longVars = function(
107 107
     $longArgument,
108 108
     $longerArgument,
109 109
     $muchLongerArgument
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     // body
116 116
 };
117 117
 
118
-$longArgs_longVars = function (
118
+$longArgs_longVars = function(
119 119
     $longArgument,
120 120
     $muchLongerArgument)use(
121 121
     $muchLongerVar3) {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 function test()
126 126
 {
127
-    $longArgs_longVars = function (
127
+    $longArgs_longVars = function(
128 128
         $longArgument,
129 129
         $longerArgument,
130 130
         $muchLongerArgument
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
     f();
159 159
 }
160 160
 
161
-$var = function() {return true;};
161
+$var = function() {return true; };
162 162
 $var = function() {return true;
163 163
 };
164
-function blah(){return true;
164
+function blah() {return true;
165 165
 }
166 166
 
167 167
 $closureWithArgsAndVars = function($arg1, $arg2) use ($var1, $var2){
@@ -169,8 +169,7 @@  discard block
 block discarded – undo
169 169
 };
170 170
 
171 171
 function
172
-blah
173
-()
172
+blah()
174 173
 {
175 174
     // body
176 175
 }
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
 if (($condition1
53 53
     || $condition2)
54
- ) {
54
+    ) {
55 55
 }
56 56
 
57 57
 if (
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 if (($condition1
48 48
     || $condition2)
49
-)  {
49
+) {
50 50
 }
51 51
 
52 52
 if (($condition1
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 }
65 65
 
66 66
 
67
-if (   $condition1
67
+if ($condition1
68 68
     || $condition2
69 69
     || $condition3
70 70
 ) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 if ($condition1
100 100
     || $condition2 || $condition3
101
-){
101
+) {
102 102
 }
103 103
 
104 104
 if ($condition1)
Please login to merge, or discard this patch.
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,19 +101,22 @@  discard block
 block discarded – undo
101 101
 ){
102 102
 }
103 103
 
104
-if ($condition1)
104
+if ($condition1) {
105 105
     echo 'bar';
106
+}
106 107
 
107 108
 if ($condition1
108 109
     || $condition2
109
-|| $condition3)
110
+|| $condition3) {
110 111
     echo 'bar';
112
+}
111 113
 
112 114
 
113 115
 if ($condition1
114 116
     || $condition2 || $condition3
115
-)
117
+) {
116 118
     echo 'bar';
119
+}
117 120
 
118 121
 if (!empty($post)
119 122
     && (!empty($context['header'])
@@ -142,18 +145,22 @@  discard block
 block discarded – undo
142 145
 endif;
143 146
 
144 147
 if ($IPP->errorCode() == 401 || // comment
145
-    $IPP->errorCode() == 3200)  /* long comment
148
+    $IPP->errorCode() == 3200) {
149
+    /* long comment
146 150
                                    here
147 151
                                  */
148 152
 {
149 153
     return false;
150 154
 }
155
+}
151 156
 
152 157
 if ($IPP->errorCode() == 401 || // comment
153
-    $IPP->errorCode() == 3200)  // long comment here
158
+    $IPP->errorCode() == 3200) {
159
+    // long comment here
154 160
 {
155 161
     return false;
156 162
 }
163
+}
157 164
 
158 165
 if ($IPP->errorCode() == 401
159 166
     // Comment explaining the next condition here.
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -45,31 +45,31 @@
 block discarded – undo
45 45
     public function getErrorList($testFile='MultiLineConditionUnitTest.inc')
46 46
     {
47 47
         $errors = array(
48
-                   21  => 1,
49
-                   22  => 1,
50
-                   35  => 1,
51
-                   40  => 1,
52
-                   41  => 1,
53
-                   42  => 1,
54
-                   43  => 1,
55
-                   49  => 1,
56
-                   54  => 1,
57
-                   57  => 1,
58
-                   58  => 1,
59
-                   59  => 1,
60
-                   61  => 1,
61
-                   67  => 1,
62
-                   87  => 1,
63
-                   88  => 1,
64
-                   89  => 1,
65
-                   90  => 1,
66
-                   96  => 2,
67
-                   101 => 1,
68
-                   109 => 2,
69
-                   125 => 1,
70
-                   145 => 1,
71
-                   153 => 1,
72
-                  );
48
+                    21  => 1,
49
+                    22  => 1,
50
+                    35  => 1,
51
+                    40  => 1,
52
+                    41  => 1,
53
+                    42  => 1,
54
+                    43  => 1,
55
+                    49  => 1,
56
+                    54  => 1,
57
+                    57  => 1,
58
+                    58  => 1,
59
+                    59  => 1,
60
+                    61  => 1,
61
+                    67  => 1,
62
+                    87  => 1,
63
+                    88  => 1,
64
+                    89  => 1,
65
+                    90  => 1,
66
+                    96  => 2,
67
+                    101 => 1,
68
+                    109 => 2,
69
+                    125 => 1,
70
+                    145 => 1,
71
+                    153 => 1,
72
+                    );
73 73
 
74 74
         if ($testFile === 'MultiLineConditionUnitTest.inc') {
75 75
             $errors[167] = 1;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getErrorList($testFile='MultiLineConditionUnitTest.inc')
45
+    public function getErrorList($testFile = 'MultiLineConditionUnitTest.inc')
46 46
     {
47 47
         $errors = array(
48 48
                    21  => 1,
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 do { echo $i; } while ($i > 0);
21 21
 
22
-do{
22
+do {
23 23
     echo $i;
24
-}while($i > 0);
24
+} while ($i > 0);
25 25
 
26 26
 
27 27
 // while
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     echo $i;
30 30
 }
31 31
 
32
-while($i < 1){
32
+while ($i < 1) {
33 33
     echo $i;
34 34
 }
35 35
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     echo $i;
42 42
 }
43 43
 
44
-for($i = 1; $i < 1; $i++){
44
+for ($i = 1; $i < 1; $i++) {
45 45
     echo $i;
46 46
 }
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     echo $item;
54 54
 }
55 55
 
56
-foreach($items as $item){
56
+foreach ($items as $item) {
57 57
     echo $item;
58 58
 }
59 59
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     $i = 1;
66 66
 }
67 67
 
68
-if($i == 0){
68
+if ($i == 0) {
69 69
     $i = 1;
70 70
 }
71 71
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 if ($i == 0) {
83 83
     $i = 1;
84
-}else{
84
+} else {
85 85
     $i = 0;
86 86
 }
87 87
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 if ($i == 0) {
99 99
     $i = 1;
100
-}else{
100
+} else {
101 101
     $i = 0;
102 102
 }
103 103
 
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
 
120 120
 if ($i == 0) {
121 121
     $i = 1;
122
-}else if($i == 2){
122
+} else if ($i == 2) {
123 123
     $i = 0;
124 124
 }
125 125
 
126 126
 if ($i == 0) {
127 127
     $i = 1;
128
-}elseif($i == 2){
128
+}elseif ($i == 2) {
129 129
     $i = 0;
130 130
 }
131 131
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 if ($i == 0) {
83 83
     $i = 1;
84
-}else{
84
+} else{
85 85
     $i = 0;
86 86
 }
87 87
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 if ($i == 0) {
99 99
     $i = 1;
100
-}else{
100
+} else{
101 101
     $i = 0;
102 102
 }
103 103
 
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
 
120 120
 if ($i == 0) {
121 121
     $i = 1;
122
-}else if($i == 2){
122
+} else if($i == 2){
123 123
     $i = 0;
124 124
 }
125 125
 
126 126
 if ($i == 0) {
127 127
     $i = 1;
128
-}elseif($i == 2){
128
+} elseif($i == 2){
129 129
     $i = 0;
130 130
 }
131 131
 
@@ -153,7 +153,6 @@  discard block
 block discarded – undo
153 153
 }
154 154
 
155 155
 if ($i == 0) {
156
-}
157
-else {
156
+} else {
158 157
 }
159 158
 ?>
160 159
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
 
25 25
 class MyClass
26 26
 {
27
-  function func1()
28
-  {
27
+    function func1()
28
+    {
29 29
     function func2()
30 30
     {
31
-     return $a;
31
+        return $a;
32 32
     }
33 33
     return $data;
34
-  }
34
+    }
35 35
 }
36 36
 
37 37
 class MyClass
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
 }
60 60
 
61 61
 class mpgResponse{
62
-   var $term_id;
63
-   var $currentTag;
64
-   function characterHandler($parser,$data){
65
-       switch($this->currentTag)
66
-       {
67
-           case "term_id": {
68
-               $this->term_id=$data;
69
-               break;
70
-           }
71
-       }
72
-   }//end characterHandler
62
+    var $term_id;
63
+    var $currentTag;
64
+    function characterHandler($parser,$data){
65
+        switch($this->currentTag)
66
+        {
67
+            case "term_id": {
68
+                $this->term_id=$data;
69
+                break;
70
+            }
71
+        }
72
+    }//end characterHandler
73 73
 }//end class mpgResponse
74 74
 
75 75
 class foo
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,14 +58,14 @@
 block discarded – undo
58 58
     }
59 59
 }
60 60
 
61
-class mpgResponse{
61
+class mpgResponse {
62 62
    var $term_id;
63 63
    var $currentTag;
64
-   function characterHandler($parser,$data){
65
-       switch($this->currentTag)
64
+   function characterHandler($parser, $data) {
65
+       switch ($this->currentTag)
66 66
        {
67 67
            case "term_id": {
68
-               $this->term_id=$data;
68
+               $this->term_id = $data;
69 69
                break;
70 70
            }
71 71
        }
Please login to merge, or discard this patch.