@@ 298-300 (lines=3) @@ | ||
295 | $this->splitDuration($value, count($units) - 1) + array_fill(0, 6, null); |
|
296 | ||
297 | $duration = ''; |
|
298 | if (isset($years) && isset($units[5])) { |
|
299 | $duration .= $seperator . $years . $units[5]; |
|
300 | } |
|
301 | ||
302 | if (isset($weeks) && isset($units[4])) { |
|
303 | $duration .= $seperator . $weeks . $units[4]; |
|
@@ 302-304 (lines=3) @@ | ||
299 | $duration .= $seperator . $years . $units[5]; |
|
300 | } |
|
301 | ||
302 | if (isset($weeks) && isset($units[4])) { |
|
303 | $duration .= $seperator . $weeks . $units[4]; |
|
304 | } |
|
305 | ||
306 | if (isset($days) && isset($units[3])) { |
|
307 | $duration .= $seperator . $days . $units[3]; |
|
@@ 306-308 (lines=3) @@ | ||
303 | $duration .= $seperator . $weeks . $units[4]; |
|
304 | } |
|
305 | ||
306 | if (isset($days) && isset($units[3])) { |
|
307 | $duration .= $seperator . $days . $units[3]; |
|
308 | } |
|
309 | ||
310 | if (isset($hours) && isset($units[2])) { |
|
311 | $duration .= $seperator . $hours . $units[2]; |
|
@@ 310-312 (lines=3) @@ | ||
307 | $duration .= $seperator . $days . $units[3]; |
|
308 | } |
|
309 | ||
310 | if (isset($hours) && isset($units[2])) { |
|
311 | $duration .= $seperator . $hours . $units[2]; |
|
312 | } |
|
313 | ||
314 | if (isset($minutes) && isset($units[1])) { |
|
315 | $duration .= $seperator . $minutes . $units[1]; |
|
@@ 314-316 (lines=3) @@ | ||
311 | $duration .= $seperator . $hours . $units[2]; |
|
312 | } |
|
313 | ||
314 | if (isset($minutes) && isset($units[1])) { |
|
315 | $duration .= $seperator . $minutes . $units[1]; |
|
316 | } |
|
317 | ||
318 | if (isset($seconds) && isset($units[0])) { |
|
319 | $duration .= $seperator . $seconds . $units[0]; |
|
@@ 318-320 (lines=3) @@ | ||
315 | $duration .= $seperator . $minutes . $units[1]; |
|
316 | } |
|
317 | ||
318 | if (isset($seconds) && isset($units[0])) { |
|
319 | $duration .= $seperator . $seconds . $units[0]; |
|
320 | } |
|
321 | ||
322 | return trim($duration, $seperator); |
|
323 | } |