Conversation
As the functional level is added through the code it should not be stored in the settings.
The explode returned an array with an empty string, if there was nothing filled in.
carakas
requested changes
Nov 13, 2020
| ); | ||
| $privacyConsentLevels = []; | ||
| if($privacyConsentLevelsField->isFilled()) { | ||
| $privacyConsentLevels = explode(',', $this->form->getField('privacy_consent_levels')->getValue()); |
Member
There was a problem hiding this comment.
You can use $privacyConsentLevelsField here
Codecov Report
@@ Coverage Diff @@
## master #3226 +/- ##
============================================
- Coverage 28.21% 28.21% -0.01%
- Complexity 8013 8014 +1
============================================
Files 567 567
Lines 30629 30632 +3
============================================
Hits 8642 8642
- Misses 21987 21990 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
carakas
requested changes
Nov 13, 2020
| $this->form->getField('show_consent_dialog')->getChecked() | ||
| ); | ||
| $privacyConsentLevels = []; | ||
| if($privacyConsentLevelsField->isFilled()) { |
Member
There was a problem hiding this comment.
codestyles also dictate that there needs to be a space after if
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Pull request description
When saving the setting a level 'functional' was stored in the settings. Which is not needed, as the level is there per default.
I also fixed a bug when no levels are defined, this was stored as an empty string.