protected $parents;
/**
- * Constructor.
- *
* @param Profiler $profiler A Profiler instance
* @param RequestStack $requestStack A RequestStack instance
* @param RequestMatcherInterface|null $matcher A RequestMatcher instance
- * @param bool $onlyException true if the profiler only collects data when an exception occurs, false otherwise
- * @param bool $onlyMasterRequests true if the profiler only collects data when the request is a master request, false otherwise
+ * @param bool $onlyException True if the profiler only collects data when an exception occurs, false otherwise
+ * @param bool $onlyMasterRequests True if the profiler only collects data when the request is a master request, false otherwise
*/
public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false)
{
/**
* Handles the onKernelException event.
- *
- * @param GetResponseForExceptionEvent $event A GetResponseForExceptionEvent instance
*/
public function onKernelException(GetResponseForExceptionEvent $event)
{
/**
* Handles the onKernelResponse event.
- *
- * @param FilterResponseEvent $event A FilterResponseEvent instance
*/
public function onKernelResponse(FilterResponseEvent $event)
{
{
// attach children to parents
foreach ($this->profiles as $request) {
- // isset call should be removed when requestStack is required
- if (isset($this->parents[$request]) && null !== $parentRequest = $this->parents[$request]) {
+ if (null !== $parentRequest = $this->parents[$request]) {
if (isset($this->profiles[$parentRequest])) {
$this->profiles[$parentRequest]->addChild($this->profiles[$request]);
}