| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Chatwork |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var ClientInterface |
||
| 21 | */ |
||
| 22 | private $client; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Chatwork constructor. |
||
| 26 | * |
||
| 27 | * @param ClientInterface $client |
||
| 28 | */ |
||
| 29 | public function __construct(ClientInterface $client) |
||
| 30 | { |
||
| 31 | $this->client = $client; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function me(): Me |
||
| 35 | { |
||
| 36 | return new Api\Me($this->client, new UserFactory()); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function my(): My |
||
| 40 | { |
||
| 41 | return new Api\My($this->client); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function contacts(): Contacts |
||
| 45 | { |
||
| 46 | return new Api\Contacts($this->client, new UserFactory()); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function rooms(): Rooms |
||
| 52 | } |
||
| 53 | |||
| 54 | public static function create(string $token, string $version = 'v2'): self |
||
| 55 | { |
||
| 57 | } |
||
| 58 | } |
||
| 59 |