getBeforeRemovingPasses example

public function testPassOrderingWithoutPasses()
    {
        $config = new PassConfig();
        $config->setBeforeOptimizationPasses([]);
        $config->setAfterRemovingPasses([]);
        $config->setBeforeRemovingPasses([]);
        $config->setOptimizationPasses([]);
        $config->setRemovingPasses([]);

        $this->assertEmpty($config->getBeforeOptimizationPasses());
        $this->assertEmpty($config->getAfterRemovingPasses());
        $this->assertEmpty($config->getBeforeRemovingPasses());
        $this->assertEmpty($config->getOptimizationPasses());
        $this->assertEmpty($config->getRemovingPasses());
    }
}
/** * Returns all passes in order to be processed. * * @return CompilerPassInterface[] */
    public function getPasses(): array
    {
        return array_merge(
            [$this->mergePass],
            $this->getBeforeOptimizationPasses(),
            $this->getOptimizationPasses(),
            $this->getBeforeRemovingPasses(),
            $this->getRemovingPasses(),
            $this->getAfterRemovingPasses()
        );
    }

    /** * Adds a pass. * * @return void * * @throws InvalidArgumentException when a pass type doesn't exist */
/** * Returns all passes in order to be processed. * * @return CompilerPassInterface[] */
    public function getPasses(): array
    {
        return array_merge(
            [$this->mergePass],
            $this->getBeforeOptimizationPasses(),
            $this->getOptimizationPasses(),
            $this->getBeforeRemovingPasses(),
            $this->getRemovingPasses(),
            $this->getAfterRemovingPasses()
        );
    }

    /** * Adds a pass. * * @return void * * @throws InvalidArgumentException when a pass type doesn't exist */
Home | Imprint | This part of the site doesn't use cookies.