src/mako/validator/Validator.php
protected function parseRule(string $rule): object
	{
		$package = null;

		if(preg_match('/^([a-z-]+)::(.*)/', $rule, $matches) === 1)
		{
			$package = $matches[1];
		}

		[$name, $parameters] = $this->parseFunction($rule, false);

		return (object) compact('name', 'parameters', 'package');
	}
protected function parseRule(string $rule): object
	{
		$package = null;

		if(preg_match('/^([a-z-]+)::(.*)/', $rule, $matches) === 1)
		{
			$package = $matches[1];
		}

		[$name, $parameters] = $this->parseFunction($rule, false);

		return (object) compact('name', 'parameters', 'package');
	}
protected function parseRule ( string $ rule ) : object { $ package = null ; if ( preg_match ( '/^([a-z-]+)::(.*)/' , $ rule , $ matches ) === 1 ) { $ package = $ matches [ 1 ] ; } [ $ name , $ parameters ] = $ this -> parseFunction ( $ rule , false ) ; return ( object ) compact ( 'name' , 'parameters' , 'package' ) ; }
Parses the rule.

@param  string $rule Rule
@return object
Parses the rule .