Skip to content

Commit dcdaa98

Browse files
committed
fix on env var
1 parent e057012 commit dcdaa98

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.github/workflows/phpunit.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ jobs:
2525
- name: Install dependencies
2626
run: composer install --prefer-dist --no-progress --no-suggest
2727

28-
- name: Check Environment Variable
29-
env:
30-
DOCUMENT_CLOUD_API_KEY: ${{ secrets.DOCUMENT_CLOUD_API_KEY }}
31-
run: echo "DOCUMENT_CLOUD_API_KEY=${{ secrets.DOCUMENT_CLOUD_API_KEY }}"
32-
3328
# Run tests
3429
- name: Run tests
3530
env:

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(
4848
?string $apiKey = null,
4949
?ClientInterface $client = null,
5050
) {
51-
$apiKey = $apiKey ?? $_ENV['DOCUMENT_CLOUD_API_KEY'] ?? null;
51+
$apiKey = $apiKey ?? getenv('DOCUMENT_CLOUD_API_KEY') ?? null;
5252
if (!$apiKey) {
5353
throw new MissingApiKeyException();
5454
}

0 commit comments

Comments
 (0)