Completed
Push — master ( 983069...57309b )
by Guillaume
04:40
created
src/Runner/Runner.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * Constructor.
40 40
      *
41 41
      * @param UrlProvider  $urlProvider
42
-     * @param GuzzleClient $client
42
+     * @param Client $client
43 43
      */
44 44
     public function __construct(UrlProvider $urlProvider, Client $client)
45 45
     {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * run.
52 52
      *
53
-     * @return array
53
+     * @return ResultCollection
54 54
      */
55 55
     public function run()
56 56
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,7 @@
 block discarded – undo
16 16
 namespace Hogosha\Monitor\Runner;
17 17
 
18 18
 use GuzzleHttp\Client;
19
-use GuzzleHttp\Exception\ConnectException;
20 19
 use GuzzleHttp\Pool;
21
-use GuzzleHttp\Promise;
22 20
 use GuzzleHttp\Psr7\Request;
23 21
 use GuzzleHttp\TransferStats;
24 22
 use Hogosha\Monitor\Client\GuzzleClient;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 
62 62
         $resultCollection = new ResultCollection();
63 63
 
64
-        $requests = function () use ($urls, $client, $resultCollection) {
64
+        $requests = function() use ($urls, $client, $resultCollection) {
65 65
             foreach ($urls as $url) {
66
-                yield function () use ($client, $url, $resultCollection) {
66
+                yield function() use ($client, $url, $resultCollection) {
67 67
                     return $client->sendAsync(
68 68
                         new Request(
69 69
                             $url->getMethod(),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                         ),
73 73
                         [
74 74
                             'timeout' => $url->getTimeout(),
75
-                            'on_stats' => function (TransferStats $tranferStats) use ($url, $resultCollection) {
75
+                            'on_stats' => function(TransferStats $tranferStats) use ($url, $resultCollection) {
76 76
 
77 77
                                 if ($tranferStats->hasResponse()) {
78 78
                                     $statusCode = $tranferStats->getResponse()->getStatusCode();
Please login to merge, or discard this patch.