Code Coverage for %ssource_with_class_and_anonymous_function.php

| Code Coverage
| Lines | Functions and Methods | Classes and Traits
Total | 100.00% covered (success) | 100.00% | 8 / 8 | 100.00% covered (success) | 100.00% | 1 / 1 | CRAP | 100.00% covered (success) | 100.00% | 1 / 1
CoveredClassWithAnonymousFunctionInStaticMethod | 100.00% covered (success) | 100.00% | 8 / 8 | 100.00% covered (success) | 100.00% | 1 / 1 | 1 | 100.00% covered (success) | 100.00% | 1 / 1
runAnonymous | 100.00% covered (success) | 100.00% | 8 / 8 | 100.00% covered (success) | 100.00% | 1 / 1 | 1 |

1 | <?php
2 |
3 | class CoveredClassWithAnonymousFunctionInStaticMethod
4 | {
5 | public static function runAnonymous()
6 | {
7 | $filter = ['abc124', 'abc123', '123'];
8 |
9 | array_walk(
10 | $filter,
11 | function (&$val, $key) {
12 | $val = preg_replace('|[^0-9]|', '', $val);
13 | }
14 | );
15 |
16 | // Should be covered
17 | $extravar = true;
18 | }
19 | }