44
55use Http \Client \Exception ;
66use Http \Client \Plugin \Journal ;
7- use Http \Message \Formatter \SimpleFormatter ;
87use Http \Message \Formatter ;
8+ use Http \Message \Formatter \SimpleFormatter ;
99use Psr \Http \Message \RequestInterface ;
1010use Psr \Http \Message \ResponseInterface ;
1111use Symfony \Component \HttpFoundation \Request ;
@@ -28,7 +28,7 @@ class MessageJournal extends DataCollector implements Journal
2828 public function __construct (Formatter $ formatter = null )
2929 {
3030 $ this ->formatter = $ formatter ?: new SimpleFormatter ();
31- $ this ->data = ['success ' => [], 'failure ' => []];
31+ $ this ->data = ['success ' => [], 'failure ' => []];
3232 }
3333
3434 /**
@@ -37,7 +37,7 @@ public function __construct(Formatter $formatter = null)
3737 public function addSuccess (RequestInterface $ request , ResponseInterface $ response )
3838 {
3939 $ this ->data ['success ' ][] = [
40- 'request ' => $ this ->formatter ->formatRequest ($ request ),
40+ 'request ' => $ this ->formatter ->formatRequest ($ request ),
4141 'response ' => $ this ->formatter ->formatResponse ($ response ),
4242 ];
4343 }
@@ -56,7 +56,7 @@ public function addFailure(RequestInterface $request, Exception $exception)
5656 }
5757
5858 $ this ->data ['failure ' ][] = [
59- 'request ' => $ this ->formatter ->formatRequest ($ request ),
59+ 'request ' => $ this ->formatter ->formatRequest ($ request ),
6060 'response ' => $ formattedResponse ,
6161 ];
6262 }
@@ -88,7 +88,7 @@ public function getFailedRequests()
8888 */
8989 public function getTotalRequests ()
9090 {
91- return count ($ this ->data ['success ' ])+ count ($ this ->data ['failure ' ]);
91+ return count ($ this ->data ['success ' ]) + count ($ this ->data ['failure ' ]);
9292 }
9393
9494 /**
0 commit comments