File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Static analysis
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+
9+ jobs :
10+ phpstan :
11+ name : PHPStan
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v2
17+
18+ - name : PHPStan
19+ uses : docker://oskarstark/phpstan-ga
20+ with :
21+ args : analyze --no-progress
Original file line number Diff line number Diff line change 1+ parameters:
2+ level: max
3+ paths:
4+ - src
Original file line number Diff line number Diff line change 44
55use Http \Client \Common \Plugin ;
66use Http \Client \Exception ;
7+ use Http \Promise \Promise ;
78use Psr \Http \Message \RequestInterface ;
89use Psr \Http \Message \ResponseInterface ;
910use Symfony \Component \Stopwatch \Stopwatch ;
@@ -29,17 +30,20 @@ public function __construct(Stopwatch $stopwatch)
2930 $ this ->stopwatch = $ stopwatch ;
3031 }
3132
33+ /**
34+ * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient)
35+ */
3236 protected function doHandleRequest (RequestInterface $ request , callable $ next , callable $ first )
3337 {
3438 $ eventName = $ this ->getStopwatchEventName ($ request );
3539 $ this ->stopwatch ->start ($ eventName , self ::CATEGORY );
3640
3741 return $ next ($ request )->then (function (ResponseInterface $ response ) use ($ eventName ) {
38- $ this ->stopwatch ->stop ($ eventName, self :: CATEGORY );
42+ $ this ->stopwatch ->stop ($ eventName );
3943
4044 return $ response ;
4145 }, function (Exception $ exception ) use ($ eventName ) {
42- $ this ->stopwatch ->stop ($ eventName, self :: CATEGORY );
46+ $ this ->stopwatch ->stop ($ eventName );
4347
4448 throw $ exception ;
4549 });
You can’t perform that action at this time.
0 commit comments