Commit 54433bf
committed
Optimize the consent was given methods
Only get the stored consent when consent is enabled. The other methods
need no adjusting as the short-circuiting by the first condition
prevents those expressions from being executed.
Consider:
`(true || $this->expensiveMethodCall())`
The expensiveMethodCall is never called as the first condition already
decided the rest of the condition.
https://www.php.net/manual/en/language.operators.logical.php1 parent 2be3625 commit 54433bf
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | | - | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
0 commit comments