Code Duplication    Length = 16-17 lines in 2 locations

src/Datium.php 2 locations

@@ 311-327 (lines=17) @@
308
   *
309
   * @return $object
310
   */
311
    public function from($calendar)
312
    {
313
314
        $this->convert = new Convert($this->date_time);
315
316
        $this->date_time = $this->convert->from($calendar);
317
318
319
        /**
320
     * We need this part for DayOf class
321
     */
322
        $this->calendar_type = $calendar;
323
324
        $this->translate_to = $calendar;
325
326
        return $this;
327
328
    }
329
330
    /**
@@ 337-352 (lines=16) @@
334
    *
335
    * @return object
336
    */
337
    public function to($calendar)
338
    {
339
340
        $this->convert = new Convert($this->date_time);
341
342
        $this->date_time = $this->convert->to($calendar);
343
344
        /**
345
     * We need this part for DayOf class
346
     */
347
        $this->calendar_type = $calendar;
348
349
        $this->translate_to = $calendar;
350
351
        return $this;
352
353
    }
354
355
    /**