Code Duplication    Length = 11-11 lines in 2 locations

src/Datium.php 2 locations

@@ 335-345 (lines=11) @@
332
   *
333
   * @return object
334
   */
335
    public function add( $value )
336
    {
337
338
        $this->date_interval_expression = str_replace(
339
            $this->config[ 'date_simple' ],
340
            $this->config[ 'date_interval' ],
341
            $value
342
        );
343
344
        $this->date_interval_expression = str_replace(
345
            ' ',
346
            '',
347
            'P' . $this->date_interval_expression
348
        );
@@ 365-375 (lines=11) @@
362
   *
363
   * @return obejct
364
   */
365
    public function sub( $value )
366
    {
367
368
        $this->date_interval_expression = str_replace(
369
            $this->config[ 'date_simple' ],
370
            $this->config[ 'date_interval' ],
371
            $value
372
        );
373
374
        $this->date_interval_expression = str_replace(
375
            ' ',
376
            '',
377
            'P' . $this->date_interval_expression
378
        );