<commit_before><?php
/*
 * This file is part of PHPUnit.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework;

class DataProviderTestSuite extends TestSuite
{
    /**
     * Sets the dependencies of a TestCase.
     *
     * @param string[] $dependencies
     */
    public function setDependencies(array $dependencies): void
    {
        foreach ($this->tests as $test) {
            $test->setDependencies($dependencies);
        }
    }

    public function getDependencies(): array
    {
        return \array_filter(
            \array_map(
                function (TestCase $test) {
                    return $test->getDependencies();
                },
                $this->tests
            ),
            function (array $dependencies) {
                return !empty($dependencies);
            }
        );
    }

    public function hasDependencies(): bool
    {
        return \count($this->getDependencies()) > 0;
    }
}
<commit_msg>Simpler handling of dependencies of DataProviders. The individual sub-tests are the data rows and do not need their own list of dependencies.<commit_after><?php
/*
 * This file is part of PHPUnit.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework;

class DataProviderTestSuite extends TestSuite
{
    /**
     * @var string[]
     */
    private $dependencies = [];

    /**
     * @param string[] $dependencies
     */
    public function setDependencies(array $dependencies): void
    {
        $this->dependencies = $dependencies;
    }

    public function getDependencies(): array
    {
        return $this->dependencies;
    }

    public function hasDependencies(): bool
    {
        return \count($this->dependencies) > 0;
    }
}

{'fraction_non_alphanumeric': 0.10558375634517767, 'fraction_numerical': 0.0010152284263959391, 'mean_word_length': 2.241776315789474, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, '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': '3210872', 'n_tokens_mistral': 527, 'n_tokens_neox': 495, 'n_words': 162}