8000 add fixed test files for autofixable errors (#162) · djoos/Symfony-coding-standard@cc9971e · GitHub
[go: up one dir, main page]

Skip to content

Commit cc9971e

Browse files
mmolldjoos
authored andcommitted
add fixed test files for autofixable errors (#162)
1 parent 19cb6f3 commit cc9971e

File tree

4 files changed

+157
-0
lines changed

4 files changed

+157
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?php
2+
3+
// classic array syntax
4+
$arr = array('foo', 'bar');
5+
6+
$arr = array(
7+
'foo'
8+
'bar',
9+
);
10+
11+
$arr = array(
12+
'foo'
13+
'bar',
14+
);
15+
16+
$arr = array(
17+
);
18+
19+
// short array syntax
20+
$arr = ['foo', 'bar'];
21+
22+
$arr = [
23+
'foo'
24+
'bar',
25+
];
26+
27+
$arr = [
28+
'foo'
29+
'bar',
30+
];
31+
32+
$arr = [
33+
];
34+
35+
// classic array syntax with comments
36+
$arr = array('foo', 'bar' /* baz */);
37+
38+
$arr = array(
39+
'foo'
40+
'bar', //baz
41+
);
42+
43+
$arr = array(
44+
'foo'
45+
'bar', //baz
46+
);
47+
48+
$arr = array(
49+
'foo'
50+
'bar', /* baz */
51+
);
52+
53+
$arr = array(
54+
'foo'
55+
'bar', /* baz */
56+
);
57+
58+
$arr = array(
59+
//'foo' => 'bar'
60+
);
61+
62+
$arr = array(
63+
//'foo' => 'bar',
64+
);
65+
66+
// short array syntax with comments
67+
$arr = ['foo', 'bar' /* baz */];
68+
69+
$arr = [
70+
'foo'
71+
'bar', //baz
72+
];
73+
74+
$arr = [
75+
'foo'
76+
'bar', //baz
77+
];
78+
79+
$arr = [
80+
'foo'
81+
'bar', /* baz */
82+
];
83+
84+
$arr = [
85+
'foo'
86+
'bar', /* baz */
87+
];
88+
89+
$arr = [
90+
];
91+
92+
$arr = [
93+
//'foo' => 'bar'
94+
];
95+
96+
$arr = [
97+
//'foo' => 'bar',
98+
];
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
function validFunctionReturnOne()
3+
{
4+
return;
5+
}
6+
7+
function validFunctionReturnTwo()
8+
{
9+
10+
return;
11+
}
12+
13+
function validFunctionReturnThree()
14+
{
15+
echo "";
16+
17+
return;
18+
}
19+
20+
function validFunctionReturnFour()
21+
{
22+
// comment
23+
return;
24+
}
25+
26+
function validFunctionReturnFive()
27+
{
28+
/**
29+
* multi-line
30+
*/
31+
return;
32+
}
33+
34+
function invalidFunctionReturnOne()
35+
{
36+
echo "";
37+
38+
return;
39+
}
40+
41+
switch ($condition) {
42+
case 'foo':
43+
return true;
44+
45+
default:
46+
return false;
47+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
$a = ($b !== $c);
4+
$a = ($b !== $c);
5+
$a = ($b !== $c);
6+
7+
$a = ($b !== $c);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
$a = ['a', 'b'];
4+
5+
$b = ['a', 'b'];

0 commit comments

Comments
 (0)
0