File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -26,28 +26,34 @@ public function setUp(): void
26
26
}
27
27
28
28
// Next check each individual one
29
- if (! isset ($ _ENV ['AUTOTASK_API_USERNAME ' ])) {
29
+ $ username = getenv ('AUTOTASK_API_USERNAME ' );
30
+ $ secret = getenv ('AUTOTASK_API_SECRET ' );
31
+ $ ic = getenv ('AUTOTASK_API_INTEGRATION_CODE ' );
32
+ $ baseUri = getenv ('AUTOTASK_API_BASE_URI ' );
33
+
34
+ // Next check each individual one
35
+ if (! $ username ) {
30
36
throw new Exception ('Unable to find find AUTOTASK_API_USERNAME env variable! ' );
31
37
}
32
38
33
- if (! isset ( $ _ENV [ ' AUTOTASK_API_SECRET ' ]) ) {
39
+ if (! $ secret ) {
34
40
throw new Exception ('Unable to find find AUTOTASK_API_SECRET env variable! ' );
35
41
}
36
42
37
- if (! isset ( $ _ENV [ ' AUTOTASK_API_INTEGRATION_CODE ' ]) ) {
43
+ if (! $ ic ) {
38
44
throw new Exception ('Unable to find find AUTOTASK_API_INTEGRATION_CODE env variable! ' );
39
45
}
40
46
41
- if (! isset ( $ _ENV [ ' AUTOTASK_API_BASE_URI ' ]) ) {
47
+ if (! $ baseUri ) {
42
48
throw new Exception ('Unable to find find AUTOTASK_API_BASE_URI env variable! ' );
43
49
}
44
50
45
51
// Now try creating the client
46
52
$ this ->client = new Client (
47
- $ _ENV [ ' AUTOTASK_API_USERNAME ' ] ,
48
- $ _ENV [ ' AUTOTASK_API_SECRET ' ] ,
49
- $ _ENV [ ' AUTOTASK_API_INTEGRATION_CODE ' ] ,
50
- $ _ENV [ ' AUTOTASK_API_BASE_URI ' ]
53
+ $ username ,
54
+ $ secret ,
55
+ $ ic ,
56
+ $ baseUri
51
57
);
52
58
}
53
59
}
You can’t perform that action at this time.
0 commit comments