Code Duplication    Length = 13-13 lines in 2 locations

app/Helpers/Helper.php 1 location

@@ 75-87 (lines=13) @@
72
        $m = $interval->i;
73
        $s = $interval->s;
74
75
        if ($d > 0) {
76
            $unit = 'day';
77
            $count = $d;
78
        } elseif ($h > 0) {
79
            $unit = 'hour';
80
            $count = $h;
81
        } elseif ($m > 0) {
82
            $unit = 'minute';
83
            $count = $m;
84
        } else {
85
            $unit = 'second';
86
            $count = $s;
87
        }
88
89
        $key = "common/time.$unit";
90

app/Models/JobPoster.php 1 location

@@ 345-357 (lines=13) @@
342
        $m = $interval->i;
343
        $s = $interval->s;
344
345
        if ($d > 0) {
346
            $unit = 'day';
347
            $count = $d;
348
        } elseif ($h > 0) {
349
            $unit = 'hour';
350
            $count = $h;
351
        } elseif ($m > 0) {
352
            $unit = 'minute';
353
            $count = $m;
354
        } else {
355
            $unit = 'second';
356
            $count = $s;
357
        }
358
359
        $key = "common/time.$unit";
360