diff --git a/composer.json b/composer.json index f3afe122..58cc2c0e 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": "^8.0", "ext-curl": "*", "ext-json": "*", - "netresearch/jsonmapper": "^3.0|^4.0|^5.0", + "netresearch/jsonmapper": "^4.2", "monolog/monolog": "^2.0|^3.0" }, "suggest": { diff --git a/src/Issue/Version.php b/src/Issue/Version.php index 8c06b8f4..30b57ed1 100644 --- a/src/Issue/Version.php +++ b/src/Issue/Version.php @@ -31,7 +31,7 @@ class Version implements \JsonSerializable public ?string $startDate = null; public ?string $userStartDate = null; - public function __construct($name = null) + public function __construct(string $name) { $this->name = $name; } diff --git a/src/Version/VersionService.php b/src/Version/VersionService.php index 17512e6b..fee0ab48 100644 --- a/src/Version/VersionService.php +++ b/src/Version/VersionService.php @@ -35,7 +35,7 @@ public function create($version) return $this->json_mapper->map( json_decode($ret), - new Version() + Version::class ); } @@ -71,7 +71,7 @@ public function get(string $id) return $this->json_mapper->map( json_decode($ret), - new Version() + Version::class ); } @@ -100,7 +100,7 @@ public function update(Version $version): Version return $this->json_mapper->map( json_decode($ret), - new Version() + Version::class ); }