BaseClient   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 21
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the mingyoung/dingtalk.
5
 *
6
 * (c) 张铭阳 <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyDingTalk\Kernel;
13
14
class BaseClient
15
{
16
    /**
17
     * @var \EasyDingTalk\Application
18
     */
19
    protected $app;
20
21
    /**
22
     * @var \EasyDingTalk\Kernel\Http\Client
23
     */
24
    protected $client;
25
26
    /**
27
     * Client constructor.
28
     *
29
     * @param \EasyDingTalk\Application $app
30
     */
31
    public function __construct($app)
32
    {
33
        $this->app = $app;
34
        $this->client = $this->app['client']->withAccessTokenMiddleware()->withRetryMiddleware();
35
    }
36
}
37