Seditio Source
Root |
./othercms/croogo-4.0.7/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php
<?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;
    }
}