public function getFunction(string $name): ?FunctionModelInterface
    {
        $functions = $this->functions->filter(function (FunctionModelInterface $function) use ($name) {
            return $function->getName() === $name;
        });
        if ($functions->isEmpty()) {
            return null;
        }
        return $functions->first();
    }
public function getFunction(string $name): ?FunctionModelInterface
    {
        $functions = $this->functions->filter(function (FunctionModelInterface $function) use ($name) {
            return $function->getName() === $name;
        });
        if ($functions->isEmpty()) {
            return null;
        }
        return $functions->first();
    }
public function getFunction ( string $ name ) : ? FunctionModelInterface { $ functions = $ this -> functions -> filter ( function ( FunctionModelInterface $ function ) use ( $ name ) { return $ function -> getName ( ) === $ name ; } ) ; if ( $ functions -> isEmpty ( ) ) { return null ; } return $ functions -> first ( ) ; }
Get a function if the function exists.

@param string $name The name of the function.

@return FunctionModelInterface|null The retrieved function, null if it does not exist.
Get a function if the function exists .