| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public static function create($apiKey, array $plugins = [], HttpClient $client = null): HttpClient |
||
| 24 | { |
||
| 25 | if (!$client) { |
||
| 26 | $client = HttpClientDiscovery::find(); |
||
| 27 | } |
||
| 28 | |||
| 29 | // $plugins[] = new ErrorPlugin(); |
||
| 30 | $plugins[] = new AuthenticationPlugin( |
||
| 31 | new Bearer($apiKey ?? getenv('SENDGRID_API_TOKEN')) |
||
| 32 | ); |
||
| 33 | |||
| 34 | return new PluginClient($client, $plugins); |
||
| 35 | } |
||
| 37 |