@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'decade', |
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | - $intervals = [ |
|
| 54 | + $intervals = [ |
|
| 55 | 55 | '60', |
| 56 | 56 | '60', |
| 57 | 57 | '24', |
@@ -65,17 +65,17 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $difference = $now - $time_og; |
| 67 | 67 | |
| 68 | - for($j = 0; $difference >= $intervals[$j] && $j < count($intervals)-1; $j++) { |
|
| 69 | - $difference /= $intervals[$j]; |
|
| 68 | + for ($j = 0; $difference >= $intervals[ $j ] && $j < count($intervals) - 1; $j++) { |
|
| 69 | + $difference /= $intervals[ $j ]; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $difference = round($difference); |
| 73 | 73 | |
| 74 | - if($difference != 1) { |
|
| 75 | - $units[$j].= 's'; |
|
| 74 | + if ($difference != 1) { |
|
| 75 | + $units[ $j ] .= 's'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $ago = $difference .''. $units[$j] .'ago'; |
|
| 78 | + $ago = $difference . '' . $units[ $j ] . 'ago'; |
|
| 79 | 79 | |
| 80 | 80 | return $ago; |
| 81 | 81 | } |