app/Statistics/Repository/FamilyRepository.php
private function topTenFamilyQuery(int $total): array
    {
        return DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->orderBy('f_numchil', 'DESC')
            ->limit($total)
            ->get()
            ->map(Family::rowMapper())
            ->filter(GedcomRecord::accessFilter())
            ->map(static function (Family $family): array {
                return [
                    'family' => $family,
                    'count'  => $family->numberOfChildren(),
                ];
            })
            ->all();
    }
private function topTenFamilyQuery(int $total): array
    {
        return DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->orderBy('f_numchil', 'DESC')
            ->limit($total)
            ->get()
            ->map(Family::rowMapper())
            ->filter(GedcomRecord::accessFilter())
            ->map(static function (Family $family): array {
                return [
                    'family' => $family,
                    'count'  => $family->numberOfChildren(),
                ];
            })
            ->all();
    }
private function topTenFamilyQuery ( int $ total ) : array { return DB :: table ( 'families' ) -> where ( 'f_file' , '=' , $ this -> tree -> id ( ) ) -> orderBy ( 'f_numchil' , 'DESC' ) -> limit ( $ total ) -> get ( ) -> map ( Family :: rowMapper ( ) ) -> filter ( GedcomRecord :: accessFilter ( ) ) -> map ( static function ( Family $ family ) : array { return [ 'family' => $ family , 'count' => $ family -> numberOfChildren ( ) , ] ; } ) -> all ( ) ; }
General query on families.

@param int $total

@return array
General query on families .