original_string: public function getRules($mRule = null) {
  		if ($mRule instanceof Rule) {
  			$mRule = $mRule->getRule();
  		}
  		$aResult = array();
  		foreach($this->aRules as $sName => $aRules) {
  			// Either no search rule is given or the search rule matches the found rule exactly or the search rule ends in “-” and the found rule starts with the search rule.
  			if(!$mRule || $sName === $mRule || (strrpos($mRule, '-') === strlen($mRule) - strlen('-') && (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1)))) {
  				$aResult = array_merge($aResult, $aRules);
  			}
  		}
  		return $aResult;
  	}
code: public function getRules($mRule = null) {
  		if ($mRule instanceof Rule) {
  			$mRule = $mRule->getRule();
  		}
  		$aResult = array();
  		foreach($this->aRules as $sName => $aRules) {
  			// Either no search rule is given or the search rule matches the found rule exactly or the search rule ends in “-” and the found rule starts with the search rule.
  			if(!$mRule || $sName === $mRule || (strrpos($mRule, '-') === strlen($mRule) - strlen('-') && (strpos($sName, $mRule) === 0 || $sName === substr($mRule, 0, -1)))) {
  				$aResult = array_merge($aResult, $aRules);
  			}
  		}
  		return $aResult;
  	}
code_tokens: public function getRules ( $ mRule = null ) { if ( $ mRule instanceof Rule ) { $ mRule = $ mRule -> getRule ( ) ; } $ aResult = array ( ) ; foreach ( $ this -> aRules as $ sName => $ aRules ) { // Either no search rule is given or the search rule matches the found rule exactly or the search rule ends in “-” and the found rule starts with the search rule. if ( ! $ mRule || $ sName === $ mRule || ( strrpos ( $ mRule , '-' ) === strlen ( $ mRule ) - strlen ( '-' ) && ( strpos ( $ sName , $ mRule ) === 0 || $ sName === substr ( $ mRule , 0 , - 1 ) ) ) ) { $ aResult = array_merge ( $ aResult , $ aRules ) ; } } return $ aResult ; }
docstring: Returns all rules matching the given rule name
  @param (null|string|Rule) $mRule pattern to search for. If null, returns all rules. if the pattern ends with a dash, all rules starting with the pattern are returned as well as one matching the pattern with the dash excluded. passing a Rule behaves like calling getRules($mRule->getRule()).
  @example $oRuleSet->getRules('font-') //returns an array of all rules either beginning with font- or matching font.
  @example $oRuleSet->getRules('font') //returns array(0 => $oRule, …) or array().
docstring_tokens: Returns all rules matching the given rule name