public function parseFunction(string $input): Method
    {
        if (! \preg_match(self::_FUNCTION, trim($input), $matches)) {
            throw new \Exception(sprintf('Unable to parse input [%s]', $input));
        }

        return new Method($matches['name'], $matches['in'], $matches['out']);
    }
public function parseFunction(string $input): Method
    {
        if (! \preg_match(self::_FUNCTION, trim($input), $matches)) {
            throw new \Exception(sprintf('Unable to parse input [%s]', $input));
        }

        return new Method($matches['name'], $matches['in'], $matches['out']);
    }
public function parseFunction ( string $ input ) : Method { if ( ! \ preg_match ( self :: _FUNCTION , trim ( $ input ) , $ matches ) ) { throw new \ Exception ( sprintf ( 'Unable to parse input [%s]' , $ input ) ) ; } return new Method ( $ matches [ 'name' ] , $ matches [ 'in' ] , $ matches [ 'out' ] ) ; }
Parse the input from a string to a function
@param  string $input
@return Method
@throws \Exception
Parse the input from a string to a function