Skip to content

Commit

Permalink
composer.json requires php7.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Mar 19, 2022
1 parent 7181cc1 commit 4fcbfbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/Nmap/Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@

class Script
{
private string $id;

private string $output;
/**
* @var string
*/
private $id;

private array $elems;
/**
* @var string
*/
private $output;

/**
* @var array
*/
private $elems;

public function __construct(string $id, string $output, array $elems)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Nmap/XmlOutputParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function parseOutputFile($xmlFile)
self::parseAddresses($xmlHost),
(string)$xmlHost->status->attributes()->state,
isset($xmlHost->hostnames) ? self::parseHostnames($xmlHost->hostnames->hostname) : array(),
isset($xmlHost->ports) ? self::parsePorts($xmlHost->ports->port) : array(),
isset($xmlHost->ports) ? self::parsePorts($xmlHost->ports->port) : array()
);
if (isset($xmlHost->hostscript)) {
$host->setScripts(self::parseScripts($xmlHost->hostscript->script));
Expand Down

0 comments on commit 4fcbfbc

Please sign in to comment.