File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -75,19 +75,12 @@ public function execute(): CollectionInterface
75
75
$ this ->results = [];
76
76
$ con = $ this ->connection ->getResource ();
77
77
78
- switch ($ this ->options ['scope ' ]) {
79
- case static ::SCOPE_BASE :
80
- $ func = 'ldap_read ' ;
81
- break ;
82
- case static ::SCOPE_ONE :
83
- $ func = 'ldap_list ' ;
84
- break ;
85
- case static ::SCOPE_SUB :
86
- $ func = 'ldap_search ' ;
87
- break ;
88
- default :
89
- throw new LdapException (sprintf ('Could not search in scope "%s". ' , $ this ->options ['scope ' ]));
90
- }
78
+ $ func = match ($ this ->options ['scope ' ]) {
79
+ static ::SCOPE_BASE => 'ldap_read ' ,
80
+ static ::SCOPE_ONE => 'ldap_list ' ,
81
+ static ::SCOPE_SUB => 'ldap_search ' ,
82
+ default => throw new LdapException (sprintf ('Could not search in scope "%s". ' , $ this ->options ['scope ' ])),
83
+ };
91
84
92
85
$ itemsLeft = $ maxItems = $ this ->options ['maxItems ' ];
93
86
$ pageSize = $ this ->options ['pageSize ' ];
You can’t perform that action at this time.
0 commit comments