| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct(string $token, array $options = [], Transport $transport = null) |
||
| 20 | { |
||
| 21 | $loop = LoopFactory::create(); |
||
| 22 | if (!($transport instanceof Transport)) { |
||
| 23 | $settings = [ |
||
| 24 | 'resource_namespace' => 'Sync', |
||
| 25 | ] + ApiSettings::transportOptionsWithToken($token) + $options; |
||
| 26 | $transport = Factory::create($loop, $settings); |
||
| 27 | } |
||
| 28 | $this->transport = $transport; |
||
| 29 | $this->client = new AsyncClient($loop, $token, $options, $this->transport); |
||
| 30 | } |
||
| 31 | |||
| 50 |