| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 1 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 37 | { |
||
| 38 | /* @var \StackOverflowApi\Options\ModuleOptions $options */ |
||
| 39 | 1 | $options = $container->get('StackoverflowApi/ModuleOptions'); |
|
| 40 | 1 | $log = $container->get('Log/StackoverflowApi'); |
|
| 41 | 1 | $transformer = $container->get(DataTransformer::class); |
|
| 42 | |||
| 43 | 1 | $client = new Client($options->getAuthorizationCode()); |
|
| 44 | $client |
||
| 45 | 1 | ->setLogger($log) |
|
| 46 | 1 | ->setTransformer($transformer) |
|
| 47 | ; |
||
| 48 | |||
| 49 | 1 | return $client; |
|
| 50 | } |
||
| 51 | } |
||
| 52 |