Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
10 / 10 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
_GoogleClientXData | |
100.00% |
10 / 10 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getLocalXCodes | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
getXMessageTemplates | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | * @noinspection PhpCSValidationInspection |
6 | */ |
7 | declare(strict_types=1); |
8 | |
9 | namespace pvc\cloud\google\err; |
10 | |
11 | |
12 | use pvc\err\XDataAbstract; |
13 | |
14 | /** |
15 | * Class _ParserXData |
16 | */ |
17 | class _GoogleClientXData extends XDataAbstract |
18 | { |
19 | |
20 | public function getLocalXCodes(): array |
21 | { |
22 | return [ |
23 | GoogleAuthenticationException::class => 1001, |
24 | GoogleDriveFileUploadException::class => 1002, |
25 | InvalidOrUnauthorizedScopeException::class => 1003, |
26 | |
27 | ]; |
28 | } |
29 | |
30 | public function getXMessageTemplates(): array |
31 | { |
32 | return [ |
33 | GoogleAuthenticationException::class => 'Unable to authenticate to Google Cloud with the credentials provided.', |
34 | GoogleDriveFileUploadException::class => 'Unable to upload file ${localFilePath} to Google Cloud with the credentials provided.', |
35 | InvalidOrUnauthorizedScopeException::class => 'Scope ${badScope} is either invalid or unauthorized for this user.', |
36 | ]; |
37 | } |
38 | } |