Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setTiming example
$start
=
microtime
(
true
)
;
foreach
(
$validGenerators
as
$generator
)
{
$generator
->
generate
(
$numberOfItems
,
$demodataContext
,
$request
->
getOptions
(
$definitionClass
)
)
;
}
$end
=
microtime
(
true
)
-
$start
;
$console
->
note
(
sprintf
(
'Took %f seconds',
$end
)
)
;
$demodataContext
->
setTiming
(
$definition
,
$numberOfItems
,
$end
)
;
}
return
$demodataContext
;
}
private
function
getFaker
(
)
: Generator
{
$faker
= Factory::
create
(
'de-DE'
)
;
$faker
->
addProvider
(
new
Commerce
(
$faker
)
)
;
$faker
->
addProvider
(
new
ImagesGeneratorProvider
(
$faker
)
)
;