Code Duplication    Length = 11-11 lines in 2 locations

src/Datium.php 2 locations

@@ 326-336 (lines=11) @@
323
   *
324
   * @return object
325
   */
326
    public function add($value)
327
    {
328
329
        $this->date_interval_expression = str_replace(
330
            $this->config[ 'date_simple' ],
331
            $this->config[ 'date_interval' ],
332
            $value
333
        );
334
335
        $this->date_interval_expression = str_replace(
336
            ' ',
337
            '',
338
            'P' . $this->date_interval_expression
339
        );
@@ 356-366 (lines=11) @@
353
   *
354
   * @return obejct
355
   */
356
    public function sub($value)
357
    {
358
359
        $this->date_interval_expression = str_replace(
360
            $this->config[ 'date_simple' ],
361
            $this->config[ 'date_interval' ],
362
            $value
363
        );
364
365
        $this->date_interval_expression = str_replace(
366
            ' ',
367
            '',
368
            'P' . $this->date_interval_expression
369
        );