File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3142,6 +3142,21 @@ function parseFunctionLike(
3142
3142
$ varName = $ param ->var ->name ;
3143
3143
$ preferRef = !empty ($ paramMeta [$ varName ]['prefer-ref ' ]);
3144
3144
$ isSensitive = !empty ($ paramMeta [$ varName ]['sensitive-param ' ]);
3145
+ foreach ($ param ->attrGroups as $ attrGroup ) {
3146
+ foreach ($ attrGroup ->attrs as $ attr ) {
3147
+ switch ($ attr ->name ->toCodeString ()) {
3148
+ case '\\SensitiveParameter ' :
3149
+ if ($ isSensitive ) {
3150
+ throw new Exception ("Redundant {$ attr ->name ->toCodeString ()} declaration. " );
3151
+ }
3152
+
3153
+ $ isSensitive = true ;
3154
+ break ;
3155
+ default :
3156
+ throw new Exception ("Unhandled attribute {$ attr ->name ->toCodeString ()}. " );
3157
+ }
3158
+ }
3159
+ }
3145
3160
unset($ paramMeta [$ varName ]);
3146
3161
3147
3162
if (isset ($ varNameSet [$ varName ])) {
You can’t perform that action at this time.
0 commit comments