File tree Expand file tree Collapse file tree 4 files changed +126
-2
lines changed Expand file tree Collapse file tree 4 files changed +126
-2
lines changed Original file line number Diff line number Diff line change @@ -140,11 +140,11 @@ protected function processWhitespace(
140
140
if ($ fix === true ) {
141
141
if ($ found > 1 ) {
142
142
$ phpcsFile ->fixer ->beginChangeset ();
143
+
143
144
for ($ i = ($ before + 1 ); $ i < ($ commentStart - 1 ); $ i ++) {
144
145
$ phpcsFile ->fixer ->replaceToken ($ i , '' );
145
146
}
146
147
147
- $ phpcsFile ->fixer ->replaceToken ($ i , $ phpcsFile ->eolChar );
148
148
$ phpcsFile ->fixer ->endChangeset ();
149
149
} else {
150
150
// Try and maintain indentation.
Original file line number Diff line number Diff line change @@ -7,17 +7,25 @@ function functionTest1($test)
7
7
{
8
8
return 42 ;
9
9
}
10
+ /**
11
+ * @return int
12
+ */
13
+ function functionTest2 ($ test )
14
+ {
15
+ return 42 ;
16
+ }
10
17
11
18
/**
12
19
* @param string $test Test Argument
13
20
*
14
21
* @return int
15
22
*/
16
- function functionTest2 ($ test )
23
+ function functionTest3 ($ test )
17
24
{
18
25
return 42 ;
19
26
}
20
27
28
+
21
29
/**
22
30
* @param array $tab Test Argument
23
31
*/
@@ -27,3 +35,40 @@ function functionTestWithCallBack($tab)
27
35
return $ t [0 ];
28
36
}, $ tab );
29
37
}
38
+
39
+ class classToTestIndentation
40
+ {
41
+ /**
42
+ * @param string $test Test Argument
43
+ */
44
+ function functionTest1 ($ test )
45
+ {
46
+ return 42 ;
47
+ }
48
+ /**
49
+ * @return int
50
+ */
51
+ function functionTest2 ($ test )
52
+ {
53
+ return 42 ;
54
+ }
55
+
56
+
57
+ /**
58
+ * @param array $tab Test Argument
59
+ */
60
+ function functionTestWithCallBack ($ tab )
61
+ {
62
+ $ thing = array_map (function ($ t ) {
63
+ return $ t [0 ];
64
+ }, $ tab );
65
+ }
66
+ }
67
+
68
+ /**
69
+ * #{@inheritdoc}
70
+ */
71
+ function functionTestInherit ($ test )
72
+ {
73
+ return 42 ;
74
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * @param string $test Test Argument
5
+ */
6
+ function functionTest1($test)
7
+ {
8
+ return 42;
9
+ }
10
+
11
+ /**
12
+ * @return int
13
+ */
14
+ function functionTest2($test)
15
+ {
16
+ return 42;
17
+ }
18
+
19
+ /**
20
+ * @param string $test Test Argument
21
+ *
22
+ * @return int
23
+ */
24
+ function functionTest3($test)
25
+ {
26
+ return 42;
27
+ }
28
+
29
+ /**
30
+ * @param array $tab Test Argument
31
+ */
32
+ function functionTestWithCallBack($tab)
33
+ {
34
+ $thing = array_map(function ($t) {
35
+ return $t[0];
36
+ }, $tab);
37
+ }
38
+
39
+ class classToTestIndentation
40
+ {
41
+ /**
42
+ * @param string $test Test Argument
43
+ */
44
+ function functionTest1($test)
45
+ {
46
+ return 42;
47
+ }
48
+
49
+ /**
50
+ * @return int
51
+ */
52
+ function functionTest2($test)
53
+ {
54
+ return 42;
55
+ }
56
+
57
+ /**
58
+ * @param array $tab Test Argument
59
+ */
60
+ function functionTestWithCallBack($tab)
61
+ {
62
+ $thing = array_map(function ($t) {
63
+ return $t[0];
64
+ }, $tab);
65
+ }
66
+ }
67
+
68
+ /**
69
+ * #{@inheritdoc}
70
+ */
71
+ function functionTestInherit($test)
72
+ {
73
+ return 42;
74
+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ public function getErrorList()
21
21
{
22
22
return array (
23
23
5 => 1 ,
24
+ 10 => 2 ,
25
+ 29 => 1 ,
26
+ 43 => 1 ,
27
+ 48 => 2 ,
28
+ 57 => 1 ,
24
29
);
25
30
}
26
31
You can’t perform that action at this time.
0 commit comments