protected function filterResults(array $array)
    {
        $curWord = $this->context->getCurrentWord();

        return array_filter($array, function($val) use ($curWord) {
            return fnmatch($curWord.'*', $val);
        });
    }
protected function filterResults(array $array)
    {
        $curWord = $this->context->getCurrentWord();

        return array_filter($array, function($val) use ($curWord) {
            return fnmatch($curWord.'*', $val);
        });
    }
protected function filterResults ( array $ array ) { $ curWord = $ this -> context -> getCurrentWord ( ) ; return array_filter ( $ array , function ( $ val ) use ( $ curWord ) { return fnmatch ( $ curWord . '*' , $ val ) ; } ) ; }
Filter out results that don't match the current word on the command line

@param string[] $array
@return string[]
Filter out results that don t match the current word on the command line