ServerTiming   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFacadeAccessor() 0 3 1
1
<?php
2
3
namespace BeyondCode\ServerTiming\Facades;
4
5
use Illuminate\Support\Facades\Facade;
6
7
/**
8
 * @method static \BeyondCode\ServerTiming\ServerTiming start(string $key) Start a unique timed event.
9
 * @method static \BeyondCode\ServerTiming\ServerTiming addMetric(string $metric) Add new event with null duration.
10
 * @method static bool hasStartedEvent(string $key) Check if a event has been created already.
11
 * @method static \BeyondCode\ServerTiming\ServerTiming measure(string $key) Stop existing event and record its duration, else start a new event.
12
 * @method static \BeyondCode\ServerTiming\ServerTiming stop(string $key) Stop a timed event and record its duration.
13
 * @method static void stopAllUnfinishedEvents() Stop all running events.
14
 * @method static \BeyondCode\ServerTiming\ServerTiming setDuration(string $key, float|int|callable $duration) Set the duration for an event if $duration is number, else record elapsed time to run a user function if $duration is callable.
15
 * @method static float|int|null getDuration(string $key) Retrieve the duration an event has taken.
16
 * @method static array events() Get the list of finished events with their associated duration.
17
 *
18
 * @see \BeyondCode\ServerTiming\ServerTiming
19
 */
20
class ServerTiming extends Facade
21
{
22
    /**
23
     * Get the registered name of the component.
24
     *
25
     * @return string
26
     */
27
    protected static function getFacadeAccessor()
28
    {
29
        return \BeyondCode\ServerTiming\ServerTiming::class;
30
    }
31
}
32