Code Duplication    Length = 16-17 lines in 2 locations

src/Datium.php 2 locations

@@ 268-284 (lines=17) @@
265
   *
266
   * @return $object
267
   */
268
    public function from( $calendar )
269
    {
270
271
        $this->convert = new Convert($this->date_time);
272
273
        $this->date_time = $this->convert->from($calendar);
274
275
276
        /**
277
     * We need this part for DayOf class
278
     */
279
        $this->calendar_type = $calendar;
280
281
        $this->translate_to = $calendar;
282
283
        return $this;
284
285
    }
286
287
    /**
@@ 294-309 (lines=16) @@
291
    *
292
    * @return object
293
    */
294
    public function to( $calendar )
295
    {
296
297
        $this->convert = new Convert($this->date_time);
298
299
        $this->date_time = $this->convert->to($calendar);
300
301
        /**
302
     * We need this part for DayOf class
303
     */
304
        $this->calendar_type = $calendar;
305
306
        $this->translate_to = $calendar;
307
308
        return $this;
309
310
    }
311
312