Code cleanup, no functional changes
This commit is contained in:
@@ -109,7 +109,7 @@ class NodelistImport implements ShouldQueue
|
||||
$tocrc .= $line."\r\n";
|
||||
|
||||
// Lines beginning with a semicolon(;) are comments
|
||||
if ((! $line) OR preg_match('/^;/',$line) OR ($line == chr(0x1a)))
|
||||
if ((! $line) OR preg_match('/^;/',$line) OR ($line === chr(0x1a)))
|
||||
continue;
|
||||
|
||||
// Remove any embedded CR and BOM
|
||||
@@ -365,7 +365,7 @@ class NodelistImport implements ShouldQueue
|
||||
|
||||
try {
|
||||
$so->addresses()->save($ao);
|
||||
if ($ao->role == Address::NODE_HC)
|
||||
if ($ao->role === Address::NODE_HC)
|
||||
$hub_id = $ao->id;
|
||||
|
||||
$no->addresses()->attach($ao,['role'=>$ao->role]);
|
||||
@@ -387,7 +387,7 @@ class NodelistImport implements ShouldQueue
|
||||
Address::whereIN('id',$remove->pluck('id')->toArray())->update(['active'=>FALSE]);
|
||||
Address::whereIN('id',$remove->pluck('id')->toArray())->delete();
|
||||
|
||||
if ($x=crc16(substr($tocrc,0,-3)) == $file_crc) {
|
||||
if ($x=crc16(substr($tocrc,0,-3)) === $file_crc) {
|
||||
Log::info(sprintf('%s:Committing nodelist',self::LOGKEY));
|
||||
DB::commit();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user