@@ -13,15 +13,15 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public static function fromIp($ip) |
| 15 | 15 | { |
| 16 | - if(starts_with($ip, '192.168.')) { |
|
| 16 | + if (starts_with($ip, '192.168.')) { |
|
| 17 | 17 | return '192.168.0.0/16'; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - if(starts_with($ip, '10.')) { |
|
| 20 | + if (starts_with($ip, '10.')) { |
|
| 21 | 21 | return '10.0.0.0/8'; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - if(preg_match('/^172\.(1[6-9]|2[0-9]|3[01])\./', $ip)) { |
|
| 24 | + if (preg_match('/^172\.(1[6-9]|2[0-9]|3[01])\./', $ip)) { |
|
| 25 | 25 | return '172.16.0.0/12'; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $colors = ['rgb(23,103,153)', 'rgb(47,135,176)', 'rgb(66,164,187)', 'rgb(91,192,196)']; |
| 61 | 61 | $highlight_colors = ['#8BB3CC', '#97C3D7', '#ADDFE1', '#BBEAE3']; |
| 62 | 62 | |
| 63 | - return $data->each(function ($network, $i) use ($colors, $highlight_colors) { |
|
| 63 | + return $data->each(function($network, $i) use ($colors, $highlight_colors) { |
|
| 64 | 64 | $network->color = $colors[$i]; |
| 65 | 65 | $network->highlight = $highlight_colors[$i]; |
| 66 | 66 | }); |