Skip to content

Commit 5f0df38

Browse files
committed
Chore: Apply format
1 parent 55c8a7a commit 5f0df38

2 files changed

Lines changed: 8 additions & 15 deletions

File tree

Scripts/Create-OUIListFromWeb.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ Generated $(Get-Date)
2121
# Root node
2222
$RootNode = $Document.CreateNode("element", "OUIs", $null)
2323

24-
foreach($Line in $LatestOUIs -split '[\r\n]')
25-
{
26-
if($Line -match "^[A-F0-9]{6}")
27-
{
24+
foreach ($Line in $LatestOUIs -split '[\r\n]') {
25+
if ($Line -match "^[A-F0-9]{6}") {
2826
# Line looks like: 2405F5 (base 16) Integrated Device Technology (Malaysia) Sdn. Bhd.
2927
$OUIData = ($Line -replace '\s+', ' ').Replace(' (base 16) ', '|').Trim().Split('|')
3028

Scripts/Create-PortListFromWeb.ps1

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,18 @@ Generated $(Get-Date)
2222
$RootNode = $Document.CreateNode("element", "Ports", $null)
2323

2424
# Create node for each port
25-
foreach($Record in $ServiceNamePortNumbers.ChildNodes.record)
26-
{
27-
if([string]::IsNullOrEmpty($Record.number) -or ([string]::IsNullOrEmpty($Record.protocol)))
28-
{
25+
foreach ($Record in $ServiceNamePortNumbers.ChildNodes.record) {
26+
if ([string]::IsNullOrEmpty($Record.number) -or ([string]::IsNullOrEmpty($Record.protocol))) {
2927
continue
3028
}
3129

32-
$Description = ($Record.description -replace '`n','') -replace '\s+',' '
30+
$Description = ($Record.description -replace '`n', '') -replace '\s+', ' '
3331
$Number = $Record.number
3432

35-
if($Number -like "*-*")
36-
{
33+
if ($Number -like "*-*") {
3734
$NumberArr = $Number.Split('-')
3835

39-
foreach($Number1 in $NumberArr[0]..$NumberArr[1])
40-
{
36+
foreach ($Number1 in $NumberArr[0]..$NumberArr[1]) {
4137
$PortNode = $Document.CreateNode("element", "Port", $null)
4238

4339
$NumberElement = $Document.CreateElement("Number")
@@ -59,8 +55,7 @@ foreach($Record in $ServiceNamePortNumbers.ChildNodes.record)
5955
[void]$RootNode.AppendChild($PortNode)
6056
}
6157
}
62-
else
63-
{
58+
else {
6459
$PortNode = $Document.CreateNode("element", "Port", $null)
6560

6661
$NumberElement = $Document.CreateElement("Number")

0 commit comments

Comments
 (0)