@@ -40,7 +40,7 @@ public function findBySidOrFail(string $sid, array $columns = ['*']): Model
4040 public function whereEnabled (): static
4141 {
4242 return $ this ->notFilter (
43- fn ($ query ) => $ query ->whereDisabled ()
43+ fn (self $ query ) => $ query ->whereDisabled ()
4444 );
4545 }
4646
@@ -60,7 +60,7 @@ public function whereDisabled(): static
6060 public function whereMember (string $ dn , bool $ nested = false ): static
6161 {
6262 return $ this ->nestedMatchQuery (
63- fn ($ attribute ) => $ this ->whereEquals ($ attribute , $ dn ),
63+ fn (string $ attribute ) => $ this ->whereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
6464 'member ' ,
6565 $ nested
6666 );
@@ -72,7 +72,7 @@ public function whereMember(string $dn, bool $nested = false): static
7272 public function orWhereMember (string $ dn , bool $ nested = false ): static
7373 {
7474 return $ this ->nestedMatchQuery (
75- fn ($ attribute ) => $ this ->orWhereEquals ($ attribute , $ dn ),
75+ fn (string $ attribute ) => $ this ->orWhereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
7676 'member ' ,
7777 $ nested
7878 );
@@ -84,7 +84,7 @@ public function orWhereMember(string $dn, bool $nested = false): static
8484 public function whereMemberOf (string $ dn , bool $ nested = false ): static
8585 {
8686 return $ this ->nestedMatchQuery (
87- fn ($ attribute ) => $ this ->whereEquals ($ attribute , $ dn ),
87+ fn (string $ attribute ) => $ this ->whereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
8888 'memberof ' ,
8989 $ nested
9090 );
@@ -96,7 +96,7 @@ public function whereMemberOf(string $dn, bool $nested = false): static
9696 public function whereNotMemberof (string $ dn , bool $ nested = false ): static
9797 {
9898 return $ this ->nestedMatchQuery (
99- fn ($ attribute ) => $ this ->whereNotEquals ($ attribute , $ dn ),
99+ fn (string $ attribute ) => $ this ->whereNotEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
100100 'memberof ' ,
101101 $ nested
102102 );
@@ -108,7 +108,7 @@ public function whereNotMemberof(string $dn, bool $nested = false): static
108108 public function orWhereMemberOf (string $ dn , bool $ nested = false ): static
109109 {
110110 return $ this ->nestedMatchQuery (
111- fn ($ attribute ) => $ this ->orWhereEquals ($ attribute , $ dn ),
111+ fn (string $ attribute ) => $ this ->orWhereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
112112 'memberof ' ,
113113 $ nested
114114 );
@@ -120,7 +120,7 @@ public function orWhereMemberOf(string $dn, bool $nested = false): static
120120 public function orWhereNotMemberof (string $ dn , bool $ nested = false ): static
121121 {
122122 return $ this ->nestedMatchQuery (
123- fn ($ attribute ) => $ this ->orWhereNotEquals ($ attribute , $ dn ),
123+ fn (string $ attribute ) => $ this ->orWhereNotEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
124124 'memberof ' ,
125125 $ nested
126126 );
@@ -132,7 +132,7 @@ public function orWhereNotMemberof(string $dn, bool $nested = false): static
132132 public function whereManager (string $ dn , bool $ nested = false ): static
133133 {
134134 return $ this ->nestedMatchQuery (
135- fn ($ attribute ) => $ this ->whereEquals ($ attribute , $ dn ),
135+ fn (string $ attribute ) => $ this ->whereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
136136 'manager ' ,
137137 $ nested
138138 );
@@ -144,7 +144,7 @@ public function whereManager(string $dn, bool $nested = false): static
144144 public function whereNotManager (string $ dn , bool $ nested = false ): static
145145 {
146146 return $ this ->nestedMatchQuery (
147- fn ($ attribute ) => $ this ->whereNotEquals ($ attribute , $ dn ),
147+ fn (string $ attribute ) => $ this ->whereNotEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
148148 'manager ' ,
149149 $ nested
150150 );
@@ -156,7 +156,7 @@ public function whereNotManager(string $dn, bool $nested = false): static
156156 public function orWhereManager (string $ dn , bool $ nested = false ): static
157157 {
158158 return $ this ->nestedMatchQuery (
159- fn ($ attribute ) => $ this ->orWhereEquals ($ attribute , $ dn ),
159+ fn (string $ attribute ) => $ this ->orWhereEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
160160 'manager ' ,
161161 $ nested
162162 );
@@ -168,7 +168,7 @@ public function orWhereManager(string $dn, bool $nested = false): static
168168 public function orWhereNotManager (string $ dn , bool $ nested = false ): static
169169 {
170170 return $ this ->nestedMatchQuery (
171- fn ($ attribute ) => $ this ->orWhereNotEquals ($ attribute , $ dn ),
171+ fn (string $ attribute ) => $ this ->orWhereNotEquals ($ attribute , $ this -> substituteBaseDn ( $ dn ) ),
172172 'manager ' ,
173173 $ nested
174174 );
0 commit comments