private function processRawData()
    {
        // Get the raw data from Xdebug
        $data = xdebug_get_code_coverage();

        // Create an array for storing processed coverage data
        $processed = [
            'classes' => [],
            'files'   => [],
        ];

        // Loop through each of the files in the coverage data
        foreach ($data as $file => $lines) {
            // Check if this file is covered
            if ($this->isCovered($file)) {
                // Filter out dead code from the results
                $filter = function ($value, $line = null) {
                    return $value !== self::DEAD;
                };
                $executable = array_filter($lines, $filter);

                // Filter out unused code to get the lines covered
                $object = $this;
                $filter = function ($value, $line) use ($object, $file) {
                    if (in_array($line, $object->covered[$file])) {
                        return $value === 1;
                    }
                };
                $covered = array_filter($lines, $filter, ARRAY_FILTER_USE_BOTH);

                // Store the counts for this file
                $coverage = [
                    'covered' => count($covered),
                    'total'   => count($executable),
                ];

                // If a classname exists in the file,
                // store the counts against it
                if ($class = $this->getClassForFile($file)) {
                    $processed['classes'][$class] = $coverage;
                    continue;
                }

                // If no class has been found, store the counts
                // directly against the file name
                $name = str_replace($this->runner->pwd.'/', '', $file);

                $processed['files'][$name] = $coverage;
            }
        }

        // Store the processed data
        return $this->processed = $processed;
    }
private function processRawData()
    {
        // Get the raw data from Xdebug
        $data = xdebug_get_code_coverage();

        // Create an array for storing processed coverage data
        $processed = [
            'classes' => [],
            'files'   => [],
        ];

        // Loop through each of the files in the coverage data
        foreach ($data as $file => $lines) {
            // Check if this file is covered
            if ($this->isCovered($file)) {
                // Filter out dead code from the results
                $filter = function ($value, $line = null) {
                    return $value !== self::DEAD;
                };
                $executable = array_filter($lines, $filter);

                // Filter out unused code to get the lines covered
                $object = $this;
                $filter = function ($value, $line) use ($object, $file) {
                    if (in_array($line, $object->covered[$file])) {
                        return $value === 1;
                    }
                };
                $covered = array_filter($lines, $filter, ARRAY_FILTER_USE_BOTH);

                // Store the counts for this file
                $coverage = [
                    'covered' => count($covered),
                    'total'   => count($executable),
                ];

                // If a classname exists in the file,
                // store the counts against it
                if ($class = $this->getClassForFile($file)) {
                    $processed['classes'][$class] = $coverage;
                    continue;
                }

                // If no class has been found, store the counts
                // directly against the file name
                $name = str_replace($this->runner->pwd.'/', '', $file);

                $processed['files'][$name] = $coverage;
            }
        }

        // Store the processed data
        return $this->processed = $processed;
    }
private function processRawData ( ) { // Get the raw data from Xdebug $ data = xdebug_get_code_coverage ( ) ; // Create an array for storing processed coverage data $ processed = [ 'classes' => [ ] , 'files' => [ ] , ] ; // Loop through each of the files in the coverage data foreach ( $ data as $ file => $ lines ) { // Check if this file is covered if ( $ this -> isCovered ( $ file ) ) { // Filter out dead code from the results $ filter = function ( $ value , $ line = null ) { return $ value !== self :: DEAD ; } ; $ executable = array_filter ( $ lines , $ filter ) ; // Filter out unused code to get the lines covered $ object = $ this ; $ filter = function ( $ value , $ line ) use ( $ object , $ file ) { if ( in_array ( $ line , $ object -> covered [ $ file ] ) ) { return $ value === 1 ; } } ; $ covered = array_filter ( $ lines , $ filter , ARRAY_FILTER_USE_BOTH ) ; // Store the counts for this file $ coverage = [ 'covered' => count ( $ covered ) , 'total' => count ( $ executable ) , ] ; // If a classname exists in the file, // store the counts against it if ( $ class = $ this -> getClassForFile ( $ file ) ) { $ processed [ 'classes' ] [ $ class ] = $ coverage ; continue ; } // If no class has been found, store the counts // directly against the file name $ name = str_replace ( $ this -> runner -> pwd . '/' , '' , $ file ) ; $ processed [ 'files' ] [ $ name ] = $ coverage ; } } // Store the processed data return $ this -> processed = $ processed ; }
Process the raw coverage data.

@return array
Process the raw coverage data .