@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\User; |
| 6 | 6 | use App\Device; |
| 7 | -use App\Port; |
|
| 8 | 7 | use Illuminate\Http\Request; |
| 9 | 8 | |
| 10 | 9 | class DeviceController extends Controller |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | // TODO: move to a common file |
| 46 | 46 | // base = 1024 for bits, 1000 for mibibits |
| 47 | - function formatBps($bits, $precision = 2, $base=1000) { |
|
| 47 | + function formatBps($bits, $precision = 2, $base = 1000) { |
|
| 48 | 48 | $units = array('bps', 'Kbps', 'Mbps', 'Gbps', 'Tbps'); |
| 49 | 49 | |
| 50 | 50 | $bits = max($bits, 0); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $bits /= pow($base, $pow); |
| 55 | 55 | |
| 56 | - return round($bits, $precision) . ' ' . $units[$pow]; |
|
| 56 | + return round($bits, $precision).' '.$units[$pow]; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // ---- Define Reletionships ---- |