File tree 2 files changed +87
-40
lines changed
2 files changed +87
-40
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public function isTwo(): bool
90
90
], true );
91
91
}
92
92
93
- public function variable (): bool
93
+ public function variableBinaryPlus (): bool
94
94
{
95
95
$ xa = $ this ->isOne ();
96
96
$ xb = 1 ;
@@ -127,6 +127,43 @@ public function variable(): bool
127
127
return $ v2 === $ v3 ;
128
128
}
129
129
130
+ public function variableBinaryConcat (): bool
131
+ {
132
+ $ xa = $ this ->isOne ();
133
+ $ xb = 1 ;
134
+ $ xc = $ xa ;
135
+
136
+ $ va
137
+ =
138
+ $ vb
139
+ =
140
+ [
141
+ $ xa ,
142
+ $ xb ,
143
+ 1
144
+ .
145
+ $ xb
146
+ . 1 ,
147
+ ];
148
+
149
+ [
150
+ $ v2 ,
151
+ $ v3
152
+ ]
153
+ =
154
+ u (
155
+ $ xa ,
156
+ $ xb ,
157
+ 1
158
+ .
159
+ $ xc
160
+ .
161
+ 1
162
+ );
163
+
164
+ return $ v2 === $ v3 ;
165
+ }
166
+
130
167
public function noElse (): int
131
168
{
132
169
$ res = 0 ;
Original file line number Diff line number Diff line change @@ -358,63 +358,73 @@ public function testHeavyIndentationIsHandledCorrectly(): void
358
358
101 ,
359
359
// line 108 is unstable - variable has no coverage if it holds const expr - https://github.com/sebastianbergmann/php-code-coverage/issues/953
360
360
113 ,
361
- // array destruct element, should be present 114,
361
+ // array destruct element, should be present 114
362
362
117 ,
363
363
127 ,
364
364
132 ,
365
365
133 ,
366
366
134 ,
367
- 135 ,
368
367
136 ,
369
- // line 137 is else statement, not in xdebug output (only if/elseif conditions are covered)
370
368
138 ,
371
- 141 ,
372
- 146 ,
373
- 148 ,
374
- 149 ,
369
+ // line 145 is unstable - same reason as line 108
370
+ 150 ,
371
+ // array destruct element, should be present 151 - same reason as line 114
375
372
154 ,
376
- 157 ,
377
- 162 ,
378
- // line 163 is try statement, not in xdebug output (only catch condition is covered)
379
373
164 ,
380
- 165 ,
381
- 168 ,
374
+ 169 ,
375
+ 170 ,
376
+ 171 ,
377
+ 172 ,
382
378
173 ,
383
- 174 ,
379
+ // line 174 is else statement, not in xdebug output (only if/elseif conditions are covered)
384
380
175 ,
385
- // line 176 is finally statement, not in xdebug output (only catch condition is covered)
386
- 177 ,
387
- 180 ,
388
- 188 ,
389
- 193 ,
390
- 195 ,
391
- 197 ,
392
- 198 ,
381
+ 178 ,
382
+ 183 ,
383
+ 185 ,
384
+ 186 ,
385
+ 191 ,
386
+ 194 ,
393
387
199 ,
394
- 200 ,
388
+ // line 200 is try statement, not in xdebug output (only catch condition is covered)
389
+ 201 ,
395
390
202 ,
396
- // line 203 is default case, not in xdebug output (only cases with condition are covered)
397
- 204 ,
398
- 207 ,
399
- 216 ,
400
- 218 ,
401
- 220 ,
402
- 222 ,
403
- 224 ,
404
- 226 ,
405
- 228 ,
391
+ 205 ,
392
+ 210 ,
393
+ 211 ,
394
+ 212 ,
395
+ // line 213 is finally statement, not in xdebug output (only catch condition is covered)
396
+ 214 ,
397
+ 217 ,
398
+ 225 ,
406
399
230 ,
407
400
232 ,
408
401
234 ,
409
- 256 ,
402
+ 235 ,
403
+ 236 ,
404
+ 237 ,
405
+ 239 ,
406
+ // line 240 is default case, not in xdebug output (only cases with condition are covered)
407
+ 241 ,
408
+ 244 ,
409
+ 253 ,
410
+ 255 ,
411
+ 257 ,
412
+ 259 ,
410
413
261 ,
414
+ 263 ,
411
415
265 ,
412
- 268 ,
413
- 272 ,
414
- 276 ,
415
- 282 ,
416
- 286 ,
417
- 292 ,
416
+ 267 ,
417
+ 269 ,
418
+ 271 ,
419
+ 293 ,
420
+ 298 ,
421
+ 302 ,
422
+ 305 ,
423
+ 309 ,
424
+ 313 ,
425
+ 319 ,
426
+ 323 ,
427
+ 329 ,
418
428
],
419
429
array_keys (RawCodeCoverageData::fromUncoveredFile ($ file , new ParsingFileAnalyser (true , true ))->lineCoverage ()[$ file ])
420
430
);
You can’t perform that action at this time.
0 commit comments