| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public static function build(array $resource, CollectionInterface $collection, WorkflowFactory $workflow_factory, LoggerInterface $logger): EndpointInterface |
||
| 27 | { |
||
| 28 | $options = [ |
||
| 29 | 'base_uri' => $resource['data']['resource']['base_uri'], |
||
| 30 | ]; |
||
| 31 | |||
| 32 | $options = array_merge($resource['data']['resource']['request_options'], $options); |
||
| 33 | $options += [ |
||
| 34 | 'cookies' => true, |
||
| 35 | 'http_errors' => true, |
||
| 36 | ]; |
||
| 37 | |||
| 38 | $client = new Client($options); |
||
| 39 | |||
| 40 | return new Ucs($resource['name'], $resource['data']['type'], $resource['data']['resource']['flavor'], $client, $collection, $workflow_factory, $logger, $resource); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |