public function translate($seconds) { $matchedRule = $this->ruleSet->getMatchingRule($seconds); $formatter = $this->ruleSet->formatterForRule($matchedRule); return sprintf($this->translation->text($matchedRule->name()), $formatter->format($seconds)); }
function let() { $this->beConstructedWith(Translation::fromArray($this->textMap), new DefaultRuleSet()); }