protected function checkHydrationElements($elements)
    {
        $elements = countriesCollect($elements)->mapWithKeys(function ($value, $key) {
            if (is_numeric($key)) {
                $key = $value;
                $value = true;
            }

            return [$key => $value];
        })->filter(function ($element) {
            return $element;
        });

        return $elements;
    }
protected function checkHydrationElements($elements)
    {
        $elements = countriesCollect($elements)->mapWithKeys(function ($value, $key) {
            if (is_numeric($key)) {
                $key = $value;
                $value = true;
            }

            return [$key => $value];
        })->filter(function ($element) {
            return $element;
        });

        return $elements;
    }
protected function checkHydrationElements ( $ elements ) { $ elements = countriesCollect ( $ elements ) -> mapWithKeys ( function ( $ value , $ key ) { if ( is_numeric ( $ key ) ) { $ key = $ value ; $ value = true ; } return [ $ key => $ value ] ; } ) -> filter ( function ( $ element ) { return $ element ; } ) ; return $ elements ; }
Check hydration elements.

@param $elements
@return static
Check hydration elements .