@@ -313,9 +313,9 @@ public function extractAttributeValuesFromResult($result, $attribute) {
313313 public function extractRangeData ($ result , $ attribute ) {
314314 $ keys = array_keys ($ result );
315315 foreach ($ keys as $ key ) {
316- if ($ key !== $ attribute && strpos ((string )$ key , $ attribute ) === 0 ) {
316+ if ($ key !== $ attribute && str_starts_with ((string )$ key , $ attribute )) {
317317 $ queryData = explode ('; ' , (string )$ key );
318- if (strpos ($ queryData [1 ], 'range= ' ) === 0 ) {
318+ if (str_starts_with ($ queryData [1 ], 'range= ' )) {
319319 $ high = substr ($ queryData [1 ], 1 + strpos ($ queryData [1 ], '- ' ));
320320 $ data = [
321321 'values ' => $ result [$ key ],
@@ -405,7 +405,7 @@ public function getDomainDNFromDN($dn) {
405405 $ domainParts = [];
406406 $ dcFound = false ;
407407 foreach ($ allParts as $ part ) {
408- if (!$ dcFound && strpos ($ part , 'dc= ' ) === 0 ) {
408+ if (!$ dcFound && str_starts_with ($ part , 'dc= ' )) {
409409 $ dcFound = true ;
410410 }
411411 if ($ dcFound ) {
@@ -1530,7 +1530,7 @@ private function getAdvancedFilterPartForSearch(string $search, $searchAttribute
15301530 private function getFilterPartForSearch (string $ search , $ searchAttributes , string $ fallbackAttribute ): string {
15311531 $ filter = [];
15321532 $ haveMultiSearchAttributes = (is_array ($ searchAttributes ) && count ($ searchAttributes ) > 0 );
1533- if ($ haveMultiSearchAttributes && strpos (trim ($ search ), ' ' ) !== false ) {
1533+ if ($ haveMultiSearchAttributes && str_contains (trim ($ search ), ' ' )) {
15341534 try {
15351535 return $ this ->getAdvancedFilterPartForSearch ($ search , $ searchAttributes );
15361536 } catch (DomainException $ e ) {
0 commit comments