Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
Apply reviews of @stephpy and @Savageman.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Feb 2, 2015
1 parent 29f66fe commit e61fbb8
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Ruler.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public function assert ( $rule, Context $context = null ) {

return $this->getAsserter($context)->visit($rule);
}

/**
* Alias for interprete. Because interpret is the correct English spelling
* Alias to the self::interprete method.
*
* @access public
* @param string $rule Rule.
Expand All @@ -114,22 +114,23 @@ public function assert ( $rule, Context $context = null ) {
*/
public static function interpret ( $rule ) {

return static::interprete($rule);
return static::getInterpreter()->visit(
static::getCompiler()->parse($rule)
);
}

/**
* Short interpreter.
*
* @access public
* @param string $rule Rule.
* @return \Hoa\Ruler\Model
* @throw \Hoa\Ruler\Exception
* @access public
* @param string $rule Rule.
* @return \Hoa\Ruler\Model
* @throw \Hoa\Ruler\Exception
* @deprecated Will be removed in 2.x.
*/
public static function interprete ( $rule ) {

return static::getInterpreter()->visit(
static::getCompiler()->parse($rule)
);
return static::interpret($rule);
}

/**
Expand Down

0 comments on commit e61fbb8

Please sign in to comment.