Code Duplication    Length = 15-15 lines in 2 locations

Collector/DebugPluginCollector.php 2 locations

@@ 78-92 (lines=15) @@
75
     *
76
     * @return array
77
     */
78
    public function getSucessfulRequests()
79
    {
80
        $count = 0;
81
        foreach ($this->data as $client) {
82
            if (isset($client['failure'])) {
83
                foreach ($client['failure'][0] as $failure) {
84
                    if (!$failure) {
85
                        ++$count;
86
                    }
87
                }
88
            }
89
        }
90
91
        return $count;
92
    }
93
94
    /**
95
     * Returns the failed request-resonse pairs.
@@ 99-113 (lines=15) @@
96
     *
97
     * @return array
98
     */
99
    public function getFailedRequests()
100
    {
101
        $count = 0;
102
        foreach ($this->data as $client) {
103
            if (isset($client['failure'])) {
104
                foreach ($client['failure'][0] as $failure) {
105
                    if ($failure) {
106
                        ++$count;
107
                    }
108
                }
109
            }
110
        }
111
112
        return $count;
113
    }
114
115
    /**
116
     * Returns the total number of request made.