@@ -79,16 +79,16 @@ public function orDoesntHave($relationMethod, ?callable ...$constraints): Builde
7979 protected function apply ($ relationMethod , string $ whereInMethod , ?callable ...$ constraints ): Builder
8080 {
8181 // Extract dot-chained expressions
82- $ relationMethods = is_string ($ relationMethod ) ? explode ('. ' , $ relationMethod ) : array_values ($ relationMethod );
82+ $ relationMethods = \ is_string ($ relationMethod ) ? \ explode ('. ' , $ relationMethod ) : \ array_values ($ relationMethod );
8383
8484 // Pick the first relation if exists
85- if ($ currentRelationMethod = array_shift ($ relationMethods )) {
85+ if ($ currentRelationMethod = \ array_shift ($ relationMethods )) {
8686 $ this ->applyForCurrentRelation (
8787 $ currentRelationMethod ,
8888 $ whereInMethod ,
8989 function (Relation $ query ) use ($ relationMethods , $ whereInMethod , $ constraints ) {
9090 // Apply optional constraints
91- if ($ currentConstraints = array_shift ($ constraints )) {
91+ if ($ currentConstraints = \ array_shift ($ constraints )) {
9292 $ currentConstraints ($ query );
9393 }
9494 // Apply relations nested under
@@ -113,7 +113,7 @@ protected function applyForCurrentRelation(string $relationMethod, string $where
113113 {
114114 // Unlike a JOIN-based approach, you don't need give table aliases.
115115 // Table names are never conflicted.
116- if (preg_match ('/\s+as\s+/i ' , $ relationMethod )) {
116+ if (\ preg_match ('/\s+as\s+/i ' , $ relationMethod )) {
117117 throw new DomainException ('Table aliases are not supported. ' );
118118 }
119119
0 commit comments