| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 41 | private function newClient() { |
||
| 42 | $middlewareFactory = new MiddlewareFactory(); |
||
| 43 | $middlewareFactory->setLogger( $this->logger ); |
||
| 44 | |||
| 45 | $handlerStack = HandlerStack::create( new CurlHandler() ); |
||
| 46 | $handlerStack->push( $middlewareFactory->retry() ); |
||
| 47 | |||
| 48 | return new Client( array( |
||
| 49 | 'cookies' => true, |
||
| 50 | 'handler' => $handlerStack, |
||
| 51 | 'headers' => array( 'User-Agent' => 'Addwiki - mediawiki-api-base' ), |
||
| 52 | ) ); |
||
| 53 | } |
||
| 54 | |||
| 69 |