/** * @param string $name * @param int $start * @param int $end * @param int $seconds * * @return RuleInterface|null */ public function buildRule($name, $start, $end, $seconds) { if (!$this->collection->has($name)) { return null; } return $this->collection->get($name)->setEnd($end)->setStart($start)->setSeconds($seconds); }
public function testGetClone() { $rule = new TestRule(); $this->collection->set('foo', $rule); $collection_rule = $this->collection->get('foo'); $collection_rule->setSeconds(123); $this->assertNotEquals($collection_rule, $this->collection->get('foo')); }