Nelmio\Alice\FixtureBag::mergeWith PHP Method

mergeWith() public method

public mergeWith ( self $newFixtures ) : self
$newFixtures self
return self
    public function mergeWith(self $newFixtures) : self
    {
        $clone = clone $this;
        foreach ($newFixtures as $fixture) {
            /** @var FixtureInterface $fixture */
            $clone->fixtures[$fixture->getId()] = $fixture;
        }
        return $clone;
    }