| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | 28 | public function register() |
|
| 27 | { |
||
| 28 | 28 | $this->mergeConfigFrom(__DIR__ . '/../config/myriad-soap.php', 'myriad-soap'); |
|
| 29 | |||
| 30 | 28 | $this->app->singleton('myriad_soap', function ($app) { |
|
| 31 | 27 | $options = $app['config']['myriad-soap']['options'] ?? []; |
|
| 32 | |||
| 33 | 27 | if (!empty($app['config']['myriad-soap']['use_http_version_1']) && !isset($options['stream_context'])) { |
|
| 34 | 27 | $options['stream_context'] = stream_context_create( |
|
| 35 | 27 | [ 'http' => [ 'protocol_version' => 1.0 ] ] |
|
| 36 | 27 | ); |
|
| 37 | } |
||
| 38 | |||
| 39 | 27 | return new MyriadApi( |
|
| 40 | 27 | new MyriadSoapClient(null, $options) |
|
| 41 | 27 | ); |
|
| 55 |