/** * @param Range $range */ public function setDays(Range $range) { $this->days = $range->serialize(); return $this; }
/** * @covers ::serialize * @covers ::unserialize */ public function testSerializable() { $range = new Range(10, 32); $this->assertSame('10|32', $range->serialize()); $range->unserialize('2|3'); $this->assertEquals(new Range(2, 3), $range); }
/** * Return a new Range object with added min and max values * * @param Range $range */ public function add(Range $range) { return new Range($this->getMin() + $range->getMin(), $this->getMax() + $range->getMax(), $this->getFormat()); }