Code Duplication    Length = 18-18 lines in 2 locations

DataCollector/ProfilingProvider.php 2 locations

@@ 36-53 (lines=18) @@
33
        $this->logger = $logger;
34
    }
35
36
    public function geocodeQuery(GeocodeQuery $query): Collection
37
    {
38
        $startTime = microtime(true);
39
        try {
40
            $results = $this->realProvider->geocodeQuery($query);
41
        } finally {
42
            $duration = (microtime(true) - $startTime) * 1000;
43
44
            $this->logger->logRequest(
45
                sprintf('[Geocoding] %s', $query),
46
                $duration,
47
                $this->getName(),
48
                $results
49
            );
50
        }
51
52
        return $results;
53
    }
54
55
    public function reverseQuery(ReverseQuery $query): Collection
56
    {
@@ 55-72 (lines=18) @@
52
        return $results;
53
    }
54
55
    public function reverseQuery(ReverseQuery $query): Collection
56
    {
57
        $startTime = microtime(true);
58
        try {
59
            $results = $this->realProvider->reverseQuery($query);
60
        } finally {
61
            $duration = (microtime(true) - $startTime) * 1000;
62
63
            $this->logger->logRequest(
64
                sprintf('[Geocoding] %s', $query),
65
                $duration,
66
                $this->getName(),
67
                $results
68
            );
69
        }
70
71
        return $results;
72
    }
73
74
    public function __call($method, $args)
75
    {