15
15
*
16
16
* @author Tobias Nyholm <[email protected] >
17
17
*/
18
- class DebugPluginCollector extends DataCollector
18
+ final class DebugPluginCollector extends DataCollector
19
19
{
20
20
/**
21
21
* @var Formatter
@@ -29,6 +29,7 @@ class DebugPluginCollector extends DataCollector
29
29
30
30
/**
31
31
* @param Formatter $formatter
32
+ * @param PluginJournal $journal
32
33
*/
33
34
public function __construct (Formatter $ formatter , PluginJournal $ journal )
34
35
{
@@ -38,6 +39,8 @@ public function __construct(Formatter $formatter, PluginJournal $journal)
38
39
39
40
/**
40
41
* @param RequestInterface $request
42
+ * @param string $clientName
43
+ * @param int $depth
41
44
*/
42
45
public function addRequest (RequestInterface $ request , $ clientName , $ depth )
43
46
{
@@ -46,6 +49,8 @@ public function addRequest(RequestInterface $request, $clientName, $depth)
46
49
47
50
/**
48
51
* @param ResponseInterface $response
52
+ * @param string $clientName
53
+ * @param int $depth
49
54
*/
50
55
public function addResponse (ResponseInterface $ response , $ clientName , $ depth )
51
56
{
@@ -55,6 +60,8 @@ public function addResponse(ResponseInterface $response, $clientName, $depth)
55
60
56
61
/**
57
62
* @param Exception $exception
63
+ * @param string $clientName
64
+ * @param int $depth
58
65
*/
59
66
public function addFailure (Exception $ exception , $ clientName , $ depth )
60
67
{
@@ -79,6 +86,7 @@ public function getSucessfulRequests()
79
86
{
80
87
$ count = 0 ;
81
88
foreach ($ this ->data as $ client ) {
89
+
82
90
if (isset ($ client ['failure ' ])) {
83
91
foreach ($ client ['failure ' ][0 ] as $ failure ) {
84
92
if (!$ failure ) {
@@ -100,6 +108,7 @@ public function getFailedRequests()
100
108
{
101
109
$ count = 0 ;
102
110
foreach ($ this ->data as $ client ) {
111
+
103
112
if (isset ($ client ['failure ' ])) {
104
113
foreach ($ client ['failure ' ][0 ] as $ failure ) {
105
114
if ($ failure ) {
@@ -156,11 +165,17 @@ public function getName()
156
165
return 'httplug ' ;
157
166
}
158
167
168
+ /**
169
+ * {@inheritdoc}
170
+ */
159
171
public function serialize ()
160
172
{
161
173
return serialize ([$ this ->data , $ this ->journal ]);
162
174
}
163
175
176
+ /**
177
+ * {@inheritdoc}
178
+ */
164
179
public function unserialize ($ data )
165
180
{
166
181
list ($ this ->data , $ this ->journal ) = unserialize ($ data );
0 commit comments