Code Duplication    Length = 16-16 lines in 2 locations

src/Datium.php 2 locations

@@ 203-218 (lines=16) @@
200
  /**
201
   * Convert from current calendar, what type is current calendar?
202
   */
203
  public function from( $calendar ) {
204
205
    $this->convert = new Convert( $this->date_time );
206
207
    $this->date_time = $this->convert->from( $calendar );
208
209
210
    /**
211
     * We need this part for DayOf class
212
     */
213
    $this->calendar_type = $calendar;
214
215
    $this->translate_to = $calendar;
216
217
    return $this;
218
219
  }
220
221
  public function to( $calendar ) {
@@ 221-236 (lines=16) @@
218
219
  }
220
221
  public function to( $calendar ) {
222
223
    $this->convert = new Convert( $this->date_time );
224
225
    $this->date_time = $this->convert->to( $calendar );
226
227
    /**
228
     * We need this part for DayOf class
229
     */
230
    $this->calendar_type = $calendar;
231
232
    $this->translate_to = $calendar;
233
234
    return $this;
235
236
  }
237
238
239
  /**