Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Dec 4, 2023
1 parent faeef15 commit 716c8e0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/Nmap/Nmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,4 @@ public static function parseOutput(string $xmlFile)
{
return (new XmlOutputParser($xmlFile))->parse();
}

}
1 change: 0 additions & 1 deletion src/Nmap/Util/ProcessExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ public function execute(array $command, int $timeout = 60): int

return (int) $process->getExitCode();
}

}
4 changes: 0 additions & 4 deletions src/Nmap/XmlOutputParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ public function parse(): array

$hosts = [];
foreach ($xml->host as $xmlHost) {

$state = $xmlHost->status->attributes()->state ?? null;
if ($state === null) {
// ? log ? throw?
Expand Down Expand Up @@ -272,7 +271,6 @@ public static function parseScriptElems(SimpleXMLElement $xmlScript): array
if (isset($xmlScript->table)) {
$elems = [];
foreach ($xmlScript->table as $xmlTable) {

$attributes = $xmlTable->attributes();
if ($attributes === null) {
continue;
Expand Down Expand Up @@ -326,7 +324,6 @@ public static function parsePorts(SimpleXMLElement $xmlPorts): array

$attrs = $xmlPort->attributes();
if (!is_null($attrs) && !is_null($xmlPort->state)) {

$state = $xmlPort->state->attributes()->state ?? null;

if ($state === null) {
Expand Down Expand Up @@ -376,5 +373,4 @@ public static function parseAddresses(SimpleXMLElement $host): array

return $addresses;
}

}

0 comments on commit 716c8e0

Please sign in to comment.