From 00616a63497fd554bccb530015ab3773829d9305 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:07:51 -0300 Subject: [PATCH] Add type hint convert classes. (#5) --- src/Converter/SemverConverter.php | 6 ++- src/Converter/SemverUtil.php | 46 ++++++++++----------- src/Converter/VersionConverterInterface.php | 6 ++- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Converter/SemverConverter.php b/src/Converter/SemverConverter.php index adeda1e..3b211af 100644 --- a/src/Converter/SemverConverter.php +++ b/src/Converter/SemverConverter.php @@ -1,5 +1,7 @@ */ -class SemverConverter implements VersionConverterInterface +final class SemverConverter implements VersionConverterInterface { - public function convertVersion($version) + public function convertVersion(string $version = null): string { if (\in_array($version, array(null, '', 'latest'), true)) { return ('latest' === $version ? 'default || ' : '').'*'; diff --git a/src/Converter/SemverUtil.php b/src/Converter/SemverUtil.php index 1d27d48..1e49a32 100644 --- a/src/Converter/SemverUtil.php +++ b/src/Converter/SemverUtil.php @@ -1,5 +1,7 @@