private function getSupervisorWhereClause(): array
    {
        if (! $this->isSupervisor()) {
            return [];
        }

        $result = [];
        foreach (Utils::getReportToUsers($this->user['id']) as $subordinate) {
            $result = array_merge_recursive(
                $result,
                (new FilterQuery($this->query, $this->table, $subordinate->toArray()))->getWhereClause()
            );
        }

        return $result;
    }
private function getSupervisorWhereClause(): array
    {
        if (! $this->isSupervisor()) {
            return [];
        }

        $result = [];
        foreach (Utils::getReportToUsers($this->user['id']) as $subordinate) {
            $result = array_merge_recursive(
                $result,
                (new FilterQuery($this->query, $this->table, $subordinate->toArray()))->getWhereClause()
            );
        }

        return $result;
    }
private function getSupervisorWhereClause ( ) : array { if ( ! $ this -> isSupervisor ( ) ) { return [ ] ; } $ result = [ ] ; foreach ( Utils :: getReportToUsers ( $ this -> user [ 'id' ] ) as $ subordinate ) { $ result = array_merge_recursive ( $ result , ( new FilterQuery ( $ this -> query , $ this -> table , $ subordinate -> toArray ( ) ) ) -> getWhereClause ( ) ) ; } return $ result ; }
Generates supervisor conditions for where clause.

It recursively calls getWhereClause() method by re-instantiating \RolesCapabilities\FilterQuery
and setting each subordinate as the instance $user property.

@return mixed[]
Generates supervisor conditions for where clause .