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 @@ -3077,6 +3077,21 @@ function parseFunctionLike(
3077
3077
$ varName = $ param ->var ->name ;
3078
3078
$ preferRef = !empty ($ paramMeta [$ varName ]['prefer-ref ' ]);
3079
3079
$ isSensitive = !empty ($ paramMeta [$ varName ]['sensitive-param ' ]);
3080
+ foreach ($ param ->attrGroups as $ attrGroup ) {
3081
+ foreach ($ attrGroup ->attrs as $ attr ) {
3082
+ switch ($ attr ->name ->toCodeString ()) {
3083
+ case '\\SensitiveParameter ' :
3084
+ if ($ isSensitive ) {
3085
+ throw new Exception ("Redundant {$ attr ->name ->toCodeString ()} declaration. " );
3086
+ }
3087
+
3088
+ $ isSensitive = true ;
3089
+ break ;
3090
+ default :
3091
+ throw new Exception ("Unhandled attribute {$ attr ->name ->toCodeString ()}. " );
3092
+ }
3093
+ }
3094
+ }
3080
3095
unset($ paramMeta [$ varName ]);
3081
3096
3082
3097
if (isset ($ varNameSet [$ varName ])) {
You can’t perform that action at this time.
0 commit comments