@@ -36,7 +36,7 @@ abstract class BaseRelation extends Relation
3636 */
3737 public function __construct (QueryBuilder $ builder , Model $ model )
3838 {
39- if (! NestedSet::isNode ($ model )) {
39+ if ( ! NestedSet::isNode ($ model )) {
4040 throw new InvalidArgumentException ('Model must be node. ' );
4141 }
4242
@@ -76,10 +76,8 @@ abstract protected function relationExistenceCondition($hash, $table, $lft, $rgt
7676 *
7777 * @return mixed
7878 */
79- public function getRelationExistenceQuery (
80- EloquentBuilder $ query ,
81- EloquentBuilder $ parent ,
82- $ columns = [ '* ' ]
79+ public function getRelationExistenceQuery (EloquentBuilder $ query , EloquentBuilder $ parent ,
80+ $ columns = [ '* ' ]
8381 ) {
8482 $ query = $ this ->getParent ()->replicate ()->newScopedQuery ()->select ($ columns );
8583
@@ -95,8 +93,7 @@ public function getRelationExistenceQuery(
9593 $ grammar ->wrapTable ($ hash ),
9694 $ grammar ->wrapTable ($ table ),
9795 $ grammar ->wrap ($ this ->parent ->getLftName ()),
98- $ grammar ->wrap ($ this ->parent ->getRgtName ())
99- );
96+ $ grammar ->wrap ($ this ->parent ->getRgtName ()));
10097
10198 return $ query ->whereRaw ($ condition );
10299 }
@@ -122,8 +119,7 @@ public function initRelation(array $models, $relation)
122119 * @return mixed
123120 */
124121 public function getRelationQuery (
125- EloquentBuilder $ query ,
126- EloquentBuilder $ parent ,
122+ EloquentBuilder $ query , EloquentBuilder $ parent ,
127123 $ columns = [ '* ' ]
128124 ) {
129125 return $ this ->getRelationExistenceQuery ($ query , $ parent , $ columns );
0 commit comments