Code Duplication    Length = 7-7 lines in 2 locations

includes/events/events.php 2 locations

@@ 346-352 (lines=7) @@
343
	 *
344
	 * @return Events
345
	 */
346
	public function from( $time ) {
347
		$last = $this->parse( $time );
348
		if ( ! is_null( $last ) ) {
349
			$this->set_events( $this->filter_events( $time, $last->getTimestamp() ) );
350
		}
351
		return $this;
352
	}
353
354
	/**
355
	 * Filter events up to to a certain time.
@@ 363-369 (lines=7) @@
360
	 *
361
	 * @return Events
362
	 */
363
	public function to( $time ) {
364
		$first = $this->parse( $time );
365
		if ( ! is_null( $first ) ) {
366
			$this->set_events( $this->filter_events( $first->getTimestamp(), $time ) );
367
		}
368
		return $this;
369
	}
370
371
	/**
372
	 * Parse time.