<commit_before><?php declare(strict_types=1);
/*
 * This file is part of phpunit/php-code-coverage.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace SebastianBergmann\CodeCoverage;

/**
 * Raw context-less code coverage data for SUT.
 */
final class RawCodeCoverageData
{
    /**
     * @var array
     *
     * @see https://xdebug.org/docs/code_coverage for format
     */
    private $lineCoverage = [];

    /**
     * @var array
     *
     * @see https://xdebug.org/docs/code_coverage for format
     */
    private $functionCoverage = [];

    public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self
    {
        return new self($rawCoverage, []);
    }

    public static function fromXdebugWithPathCoverage(array $rawCoverage): self
    {
        $lineCoverage = $functionCoverage = [];

        foreach ($rawCoverage as $file => $fileCoverageData) {
            if (isset($fileCoverageData['functions'])) {
                $lineCoverage[$file]     = $fileCoverageData['lines'];
                $functionCoverage[$file] = $fileCoverageData['functions'];
            } else { // not every file has functions, Xdebug outputs just line data for these
                $lineCoverage[$file] = $fileCoverageData;
            }
        }

        return new self($lineCoverage, $functionCoverage);
    }<commit_msg>Fix CS/WS issue<commit_after><?php declare(strict_types=1);
/*
 * This file is part of phpunit/php-code-coverage.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace SebastianBergmann\CodeCoverage;

/**
 * Raw context-less code coverage data for SUT.
 */
final class RawCodeCoverageData
{
    /**
     * @var array
     *
     * @see https://xdebug.org/docs/code_coverage for format
     */
    private $lineCoverage = [];

    /**
     * @var array
     *
     * @see https://xdebug.org/docs/code_coverage for format
     */
    private $functionCoverage = [];

    public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self
    {
        return new self($rawCoverage, []);
    }

    public static function fromXdebugWithPathCoverage(array $rawCoverage): self
    {
        $lineCoverage     = [];
        $functionCoverage = [];

        foreach ($rawCoverage as $file => $fileCoverageData) {
            if (isset($fileCoverageData['functions'])) {
                $lineCoverage[$file]     = $fileCoverageData['lines'];
                $functionCoverage[$file] = $fileCoverageData['functions'];
            } else { // not every file has functions, Xdebug outputs just line data for these
                $lineCoverage[$file] = $fileCoverageData;
            }
        }

        return new self($lineCoverage, $functionCoverage);
    }
{'fraction_non_alphanumeric': 0.11836734693877551, 'fraction_numerical': 0.0006802721088435374, 'mean_word_length': 2.5997552019583843, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2105338', 'n_tokens_mistral': 889, 'n_tokens_neox': 827, 'n_words': 212}