Code Duplication    Length = 16-17 lines in 2 locations

src/Datium.php 2 locations

@@ 325-341 (lines=17) @@
322
     *
323
     * @return $object
324
     */
325
    public function from($calendar)
326
    {
327
328
        $this->convert = new Convert($this->date_time);
329
330
        $this->date_time = $this->convert->from($calendar);
331
332
333
        /**
334
         * We need this part for DayOf class
335
         */
336
        $this->calendar_type = $calendar;
337
338
        $this->translate_to = $calendar;
339
340
        return $this;
341
342
    }
343
344
    /**
@@ 351-366 (lines=16) @@
348
     *
349
     * @return object
350
     */
351
    public function to($calendar)
352
    {
353
354
        $this->convert = new Convert($this->date_time);
355
356
        $this->date_time = $this->convert->to($calendar);
357
358
        /**
359
         * We need this part for DayOf class
360
         */
361
        $this->calendar_type = $calendar;
362
363
        $this->translate_to = $calendar;
364
365
        return $this;
366
367
    }
368
369
    /**