Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 6
Client
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
12
0.00% covered (danger)
0.00%
0 / 6
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 __call
0.00% covered (danger)
0.00%
0 / 1
6
0.00% covered (danger)
0.00%
0 / 3
1<?php
2
3namespace Qmp\Laravel\Ovh\Ovh;
4
5use \Ovh\Api;
6
7class Client
8{
9    private $ovh;
10
11    public function __construct($applicationKey, $applicationSecret, $endpoint, $consumerKey)
12    {
13        $this->ovh = new Api(
14            $applicationKey,
15            $applicationSecret,
16            $endpoint,
17            $consumerKey
18        );
19    }
20
21    public function __call($name, $arguments)
22    {
23        if (!method_exists($this->ovh, $name)) {
24            throw new \Exception("Method '$name' does not exist on Ovh client");
25        }
26
27        return call_user_func_array([$this->ovh, $name], $arguments);
28    }
29}