PhpBench\Benchmark\Metadata\BenchmarkMetadata::filterSubjectGroups PHP Method

filterSubjectGroups() public method

Remove all the subjects which are not contained in the given list of groups.
public filterSubjectGroups ( array $groups )
$groups array
    public function filterSubjectGroups(array $groups)
    {
        foreach ($this->subjects as $subjectName => $subject) {
            if (0 === count(array_intersect($subject->getGroups(), $groups))) {
                unset($this->subjects[$subjectName]);
            }
        }
    }