Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SerializerDataCollector.php

function SerializerDataCollector::getTotalTime

File

vendor/symfony/serializer/DataCollector/SerializerDataCollector.php, line 67

Class

SerializerDataCollector
@author Mathias Arlaud <mathias.arlaud@gmail.com>

Namespace

Symfony\Component\Serializer\DataCollector

Code

public function getTotalTime() : float {
    $totalTime = 0;
    foreach ($this->data as $handled) {
        $totalTime += array_sum(array_map(fn(array $el): float => $el['time'], $handled));
    }
    return $totalTime;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal