Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/Data/Import/IP6NetsCommand.php
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | public function handle() | ||||
$numLines = $this->countLines($file); | $numLines = $this->countLines($file); | ||||
if (!$numLines) { | if (!$numLines) { | ||||
\Log::error("No relevant lines could be found in {$file}"); | \Log::error("No relevant lines could be found in {$file}"); | ||||
continue; | continue; | ||||
} | } | ||||
$bar = \App\Utils::createProgressBar( | $bar = $this->createProgressBar($numLines, "Importing IPv6 Networks from {$file}"); | ||||
$this->output, | |||||
$numLines, | |||||
"Importing IPv6 Networks from {$file}" | |||||
); | |||||
$fp = fopen($file, 'r'); | $fp = fopen($file, 'r'); | ||||
$nets = []; | $nets = []; | ||||
while (!feof($fp)) { | while (!feof($fp)) { | ||||
$line = trim(fgets($fp)); | $line = trim(fgets($fp)); | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |