Code Duplication    Length = 9-10 lines in 2 locations

Profiler/Collector.php 2 locations

@@ 40-48 (lines=9) @@
37
     *
38
     * @return $this
39
     */
40
    public function collect($name, $data, $destination = DataCollection::DESTINATION_PROFILER, $type = null)
41
    {
42
        $this->collectedKeys[] = $name;
43
44
        $dataCollection = new DataCollection($name, $data, $destination, $type);
45
        $this->data[$this->handleDataKey($name)] = $dataCollection;
46
47
        return $this;
48
    }
49
50
    /**
51
     * @param string $name
@@ 58-67 (lines=10) @@
55
     *
56
     * @return $this
57
     */
58
    public function collectOnce($name, $data, $destination = DataCollection::DESTINATION_PROFILER, $type = null)
59
    {
60
        if (!in_array($name, $this->collectedKeys)) {
61
            $this->collectedKeys[] = $name;
62
            $dataCollection = new DataCollection($name, $data, $destination, $type);
63
            $this->data[$this->handleDataKey($name)] = $dataCollection;
64
        }
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return mixed