Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
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 */