File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,14 @@ public static function getAll()
51
51
$ attributes = $ value ->attributes ();
52
52
$ emailadress = (string ) $ attributes ['address ' ];
53
53
$ emailtype = substr (strstr ($ attributes ['rel ' ], '# ' ), 1 );
54
- $ contactDetails [$ key ][$ emailtype] = $ emailadress ;
54
+ $ contactDetails [$ key ][] = [ ' type ' => $ emailtype, ' email ' => $ emailadress] ;
55
55
break ;
56
56
case 'phoneNumber ' :
57
57
$ attributes = $ value ->attributes ();
58
58
$ uri = (string ) $ attributes ['uri ' ];
59
59
$ type = substr (strstr ($ attributes ['rel ' ], '# ' ), 1 );
60
60
$ e164 = substr (strstr ($ uri , ': ' ), 1 );
61
- $ contactDetails [$ key ][$ type] = $ e164 ;
61
+ $ contactDetails [$ key ][] = [ ' type ' => $ type, ' number ' => $ e164] ;
62
62
break ;
63
63
default :
64
64
$ contactDetails [$ key ] = (string ) $ value ;
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ abstract class GoogleHelper
6
6
{
7
7
private static function loadConfig ()
8
8
{
9
- $ contents = file_get_contents (__DIR__ .'/../.config.json ' );
10
-
9
+ $ configPath = __DIR__ .'/../../../../.config.json ' ;
10
+ if (!file_exists ($ configPath )) throw new \Exception ('Not found config.json ' );
11
+ $ contents = file_get_contents ($ configPath );
11
12
$ config = json_decode ($ contents );
12
13
13
14
return $ config ;
You can’t perform that action at this time.
0 commit comments