private function filterDuplicates($array)
    {
        $result = [];
        foreach ($array as $value) {
            if (!in_array($value, $result)) {
                $result[] = $value;
            }
        }
        return array_filter($result);
    }
private function filterDuplicates($array)
    {
        $result = [];
        foreach ($array as $value) {
            if (!in_array($value, $result)) {
                $result[] = $value;
            }
        }
        return array_filter($result);
    }
private function filterDuplicates ( $ array ) { $ result = [ ] ; foreach ( $ array as $ value ) { if ( ! in_array ( $ value , $ result ) ) { $ result [ ] = $ value ; } } return array_filter ( $ result ) ; }
Filter duplicates from an array

@param string[] $array
@return string[]
Filter duplicates from an array