Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Client |
||
6 | { |
||
7 | const DRIVE = \Google_Service_Sheets::DRIVE; |
||
8 | const DRIVE_FILE = \Google_Service_Sheets::DRIVE_FILE; |
||
9 | const DRIVE_READONLY = \Google_Service_Sheets::DRIVE_READONLY; |
||
10 | const SPREADSHEETS = \Google_Service_Sheets::SPREADSHEETS; |
||
11 | const SPREADSHEETS_READONLY = \Google_Service_Sheets::SPREADSHEETS_READONLY; |
||
12 | const DEFAULT_SCOPES = [ |
||
13 | self::DRIVE, |
||
14 | self::DRIVE_FILE, |
||
15 | self::DRIVE_READONLY, |
||
16 | self::SPREADSHEETS, |
||
17 | self::SPREADSHEETS_READONLY, |
||
18 | ]; |
||
19 | |||
20 | /** |
||
21 | * @var \Google_Client |
||
22 | */ |
||
23 | private $googleClient; |
||
24 | |||
25 | /** |
||
26 | * @var \Google_Service_Sheets |
||
27 | */ |
||
28 | private $googleServiceSheets; |
||
29 | |||
30 | /** |
||
31 | * @param \Google_Client $googleClient |
||
32 | * @param string $scope |
||
33 | */ |
||
34 | public function __construct(\Google_Client $googleClient, $scope = null) |
||
35 | { |
||
36 | $this->googleClient = $googleClient; |
||
37 | $this->setScope($scope); |
||
38 | |||
39 | $this->googleServiceSheets = new \Google_Service_Sheets($this->googleClient); |
||
40 | } |
||
41 | |||
42 | private function setScope($scope) |
||
52 | } |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return \Google_Service_Sheets |
||
57 | */ |
||
58 | public function getGoogleServiceSheets() |
||
63 |