-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tokenCacheDir to the firebase options #192
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,13 +67,15 @@ public function __construct(array $tiqrConfiguration) | |
$this->options['apns.environment'] = $tiqrConfiguration['library']['apns']['environment']; | ||
} | ||
|
||
if (isset($tiqrConfiguration['library']['firebase'])) { | ||
if (isset($tiqrConfiguration['library']['firebase']) && is_array($tiqrConfiguration['library']['firebase'])) { | ||
Assertion::string($tiqrConfiguration['library']['firebase']['projectId']); | ||
$this->options['firebase.projectId'] = $tiqrConfiguration['library']['firebase']['projectId']; | ||
Assertion::string($tiqrConfiguration['library']['firebase']['credentialsFile']); | ||
$this->options['firebase.credentialsFile'] = $tiqrConfiguration['library']['firebase']['credentialsFile']; | ||
Assertion::boolean($tiqrConfiguration['library']['firebase']['cacheTokens']); | ||
$this->options['firebase.cacheTokens'] = $tiqrConfiguration['library']['firebase']['cacheTokens']; | ||
Assertion::string($tiqrConfiguration['library']['firebase']['tokenCacheDir']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not type safe enough also see the failing PHPStan There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added check if it is an array There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably want to convert this to an object instead of an array when there's maintenance. |
||
$this->options['firebase.tokenCacheDir'] = $tiqrConfiguration['library']['firebase']['tokenCacheDir']; | ||
} | ||
|
||
if (isset($tiqrConfiguration['accountblocking'][self::MAX_ATTEMPTS])) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The missing link! 🥇