src/SEOTools/OpenGraph.php
protected function cleanProperties($attributes = [], $validKeys = [])
    {
        $array = [];

        foreach ($attributes as $attribute => $value) {
            if (in_array($attribute, $validKeys)) {
                $array[$attribute] = $value;
            }
        }

        return $array;
    }
protected function cleanProperties($attributes = [], $validKeys = [])
    {
        $array = [];

        foreach ($attributes as $attribute => $value) {
            if (in_array($attribute, $validKeys)) {
                $array[$attribute] = $value;
            }
        }

        return $array;
    }
protected function cleanProperties ( $ attributes = [ ] , $ validKeys = [ ] ) { $ array = [ ] ; foreach ( $ attributes as $ attribute => $ value ) { if ( in_array ( $ attribute , $ validKeys ) ) { $ array [ $ attribute ] = $ value ; } } return $ array ; }
Clean invalid properties.

@param array $attributes attributes input
@param string[] $validKeys  keys that are allowed

@return array
Clean invalid properties .