Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
88.89% covered (warning)
88.89%
8 / 9
CoveredClassWithAnonymousFunctionInStaticMethod
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
1.00
88.89% covered (warning)
88.89%
8 / 9
 runAnonymous
0.00% covered (danger)
0.00%
0 / 1
1.00
88.89% covered (warning)
88.89%
8 / 9
<?php
class CoveredClassWithAnonymousFunctionInStaticMethod
{
    public static function runAnonymous()
    {
        $filter = ['abc124', 'abc123', '123'];
        array_walk(
            $filter,
            function (&$val, $key) {
                $val = preg_replace('|[^0-9]|', '', $val);
            }
        );
        // Should be covered
        $extravar = true;
    }
}