private function clearEmptyGroups()
    {
        foreach (Craft::$app->sites->getAllGroups() as $group) {
            if (count($group->getSites()) == 0) {
                Craft::$app->sites->deleteGroup($group);
            }
        }
    }
private function clearEmptyGroups()
    {
        foreach (Craft::$app->sites->getAllGroups() as $group) {
            if (count($group->getSites()) == 0) {
                Craft::$app->sites->deleteGroup($group);
            }
        }
    }
private function clearEmptyGroups ( ) { foreach ( Craft :: $ app -> sites -> getAllGroups ( ) as $ group ) { if ( count ( $ group -> getSites ( ) ) == 0 ) { Craft :: $ app -> sites -> deleteGroup ( $ group ) ; } } }
Clear empty sute groups
Clear empty sute groups