Code Duplication    Length = 15-15 lines in 2 locations

Collector/DebugPluginCollector.php 2 locations

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