From 3466cba55e8cb52f13034d710dbb8c1e7dbbdf07 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 19 Mar 2022 20:32:57 +0000 Subject: [PATCH] more psalm like things --- psalm.xml | 2 -- src/Nmap/Port.php | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/psalm.xml b/psalm.xml index c94bb67..89b5da1 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,5 @@ - diff --git a/src/Nmap/Port.php b/src/Nmap/Port.php index 399c599..3309bbb 100644 --- a/src/Nmap/Port.php +++ b/src/Nmap/Port.php @@ -19,19 +19,34 @@ class Port const STATE_CLOSED = 'closed'; + /** + * @var int + */ private $number; + /** + * @var string + */ private $protocol; + /** + * @var string + */ private $state; + /** + * @var Service + */ private $service; + /** + * @var array + */ private $scripts = []; public function __construct(int $number, string $protocol, string $state, Service $service) { - $this->number = (int) $number; + $this->number = $number; $this->protocol = $protocol; $this->state = $state; $this->service = $service;