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 @@ -3261,6 +3261,21 @@ function parseFunctionLike(
3261
3261
$ varName = $ param ->var ->name ;
3262
3262
$ preferRef = !empty ($ paramMeta [$ varName ]['prefer-ref ' ]);
3263
3263
$ isSensitive = !empty ($ paramMeta [$ varName ]['sensitive-param ' ]);
3264
+ foreach ($ param ->attrGroups as $ attrGroup ) {
3265
+ foreach ($ attrGroup ->attrs as $ attr ) {
3266
+ switch ($ attr ->name ->toCodeString ()) {
3267
+ case '\\SensitiveParameter ' :
3268
+ if ($ isSensitive ) {
3269
+ throw new Exception ("Redundant {$ attr ->name ->toCodeString ()} declaration. " );
3270
+ }
3271
+
3272
+ $ isSensitive = true ;
3273
+ break ;
3274
+ default :
3275
+ throw new Exception ("Unhandled attribute {$ attr ->name ->toCodeString ()}. " );
3276
+ }
3277
+ }
3278
+ }
3264
3279
unset($ paramMeta [$ varName ]);
3265
3280
3266
3281
if (isset ($ varNameSet [$ varName ])) {
You can’t perform that action at this time.
0 commit comments