diff --git a/composer.json b/composer.json
index f0a9598..1e60d2e 100644
--- a/composer.json
+++ b/composer.json
@@ -24,10 +24,10 @@
     "php": ">=8.1"
   },
   "require-dev": {
-    "phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
+    "phpunit/phpunit": "^10.5.17",
     "rector/rector": "^1.0.4",
     "symplify/easy-coding-standard": "^11.0",
-    "vimeo/psalm": "^4.24"
+    "vimeo/psalm": "^5.23.1"
   },
   "autoload": {
     "psr-4": {
diff --git a/lib/Common/BitMatrix.php b/lib/Common/BitMatrix.php
index 442cd0c..e82e879 100644
--- a/lib/Common/BitMatrix.php
+++ b/lib/Common/BitMatrix.php
@@ -113,7 +113,7 @@ public function set(int|float $x, int|float $y): void
 		//$this->bits[$offset] = intval32bits($this->bits[$offset]);
 
 		//}
-//16777216
+		//16777216
 	}
 
 	public function _unset($x, $y): void
diff --git a/lib/Common/Detector/MathUtils.php b/lib/Common/Detector/MathUtils.php
index 54bdbbe..379e162 100644
--- a/lib/Common/Detector/MathUtils.php
+++ b/lib/Common/Detector/MathUtils.php
@@ -30,8 +30,8 @@ private function __construct()
 	 * values. -2.5 rounds to -3, not -2. For purposes here it makes no difference.
 	 *
 	 * @param float $d real value to round
-	 *
-	 * @return int {@code int}
+     *
+     * @return int
 	 */
 	public static function round(float $d)
 	{
diff --git a/lib/Common/Detector/MonochromeRectangleDetector.php b/lib/Common/Detector/MonochromeRectangleDetector.php
index d7f5be2..14094b6 100644
--- a/lib/Common/Detector/MonochromeRectangleDetector.php
+++ b/lib/Common/Detector/MonochromeRectangleDetector.php
@@ -165,8 +165,8 @@ private function findCornerFromCenter(
 	): \Zxing\ResultPoint {
 		$lastRange = null;
 		for ($y = $centerY, $x = $centerX;
-			 $y < $bottom && $y >= $top && $x < $right && $x >= $left;
-			 $y += $deltaY, $x += $deltaX) {
+			$y < $bottom && $y >= $top && $x < $right && $x >= $left;
+			$y += $deltaY, $x += $deltaX) {
 			$range = 0;
 			if ($deltaX == 0) {
 				// horizontal slices, up and down
diff --git a/lib/Common/Reedsolomon/GenericGF.php b/lib/Common/Reedsolomon/GenericGF.php
index 38e75a8..21612b7 100644
--- a/lib/Common/Reedsolomon/GenericGF.php
+++ b/lib/Common/Reedsolomon/GenericGF.php
@@ -172,11 +172,13 @@ public function multiply(int|float|null $a, int|float|null $b)
 		return $this->expTable[($this->logTable[$a] + $this->logTable[$b]) % ($this->size - 1)];
 	}
 
+    /** @return int */
 	public function getSize()
 	{
 		return $this->size;
 	}
 
+    /** @return int */
 	public function getGeneratorBase()
 	{
 		return $this->generatorBase;
diff --git a/lib/IMagickLuminanceSource.php b/lib/IMagickLuminanceSource.php
index f4ef0dc..e7a6acd 100644
--- a/lib/IMagickLuminanceSource.php
+++ b/lib/IMagickLuminanceSource.php
@@ -61,15 +61,17 @@ public function rotateCounterClockwise45(): void
 	 * Converts shorthand memory notation value to bytes
 	 * From http://php.net/manual/en/function.ini-get.php
 	 *
-	 * @param int $val Memory size shorthand notation string
+	 * @param string $val Memory size shorthand notation string
+	 *
+	 * @return float|int|string
 	 */
-	protected static function kmgStringToBytes(string $val)
+	protected static function kmgStringToBytes(string $val): int|float|string
 	{
 		$val = trim($val);
 		$last = strtolower($val[strlen($val) - 1]);
 		$val = substr($val, 0, -1);
 		switch ($last) {
-				// The 'G' modifier is available since PHP 5.1.0
+			// The 'G' modifier is available since PHP 5.1.0
 			case 'g':
 				$val *= 1024;
 				// no break
diff --git a/lib/Qrcode/Decoder/Decoder.php b/lib/Qrcode/Decoder/Decoder.php
index c88279e..23cb11c 100644
--- a/lib/Qrcode/Decoder/Decoder.php
+++ b/lib/Qrcode/Decoder/Decoder.php
@@ -40,16 +40,13 @@ public function __construct()
 		$this->rsDecoder = new ReedSolomonDecoder(GenericGF::$QR_CODE_FIELD_256);
 	}
 
-	public function decode(BitMatrix|BitMatrixParser $variable, array|null $hints = null): string|DecoderResult
+    /**
+     * @throws FormatException
+     * @throws ChecksumException
+     */
+    public function decode(BitMatrix|BitMatrixParser $variable, array|null $hints = null): string|DecoderResult
 	{
-		if (is_array($variable)) {
-			return $this->decodeImage($variable, $hints);
-		} elseif ($variable instanceof BitMatrix) {
-			return $this->decodeBits($variable, $hints);
-		} elseif ($variable instanceof BitMatrixParser) {
-			return $this->decodeParser($variable, $hints);
-		}
-		die('decode error Decoder.php');
+        return $this->decodeBits($variable, $hints);
 	}
 
 	/**
@@ -93,7 +90,6 @@ public function decodeImage(array $image, $hints = null): string|DecoderResult
 	 */
 	public function decodeBits(\Zxing\Common\BitMatrix $bits, $hints = null): string|DecoderResult
 	{
-
 		// Construct a parser and read version, error-correction level
 		$parser = new BitMatrixParser($bits);
 		$fe = null;
@@ -107,7 +103,6 @@ public function decodeBits(\Zxing\Common\BitMatrix $bits, $hints = null): string
 		}
 
 		try {
-
 			// Revert the bit matrix
 			$parser->remask();
 
diff --git a/lib/Qrcode/Detector/AlignmentPatternFinder.php b/lib/Qrcode/Detector/AlignmentPatternFinder.php
index 07b1014..129af94 100644
--- a/lib/Qrcode/Detector/AlignmentPatternFinder.php
+++ b/lib/Qrcode/Detector/AlignmentPatternFinder.php
@@ -126,7 +126,7 @@ public function find()
 			return $this->possibleCenters[0];
 		}
 
-		throw  new NotFoundException("Bottom right alignment pattern not found");
+		throw new NotFoundException("Bottom right alignment pattern not found");
 	}
 
 	/**
@@ -198,9 +198,9 @@ private static function centerFromEnd(array $stateCount, int $end)
 	 * alignment pattern to see if the same proportion is detected.</p>
 	 *
 	 * @param int $startI row   where an alignment pattern was detected
-	 * @param float $centerJ center  of the section that appears to cross an alignment pattern
+	 * @param int $centerJ center of the section that appears to cross an alignment pattern
 	 * @param int $maxCount maximum reasonable number of modules that should be
-	 *                 observed in any reading state, based on the results of the horizontal scan
+  *                 observed in any reading state, based on the results of the horizontal scan
 	 *
 	 * @return float vertical center of alignment pattern, or {@link Float#NaN} if not found
 	 */
diff --git a/lib/Qrcode/Detector/Detector.php b/lib/Qrcode/Detector/Detector.php
index f3dac17..87881af 100644
--- a/lib/Qrcode/Detector/Detector.php
+++ b/lib/Qrcode/Detector/Detector.php
@@ -25,7 +25,6 @@
 use Zxing\DecodeHintType;
 use Zxing\FormatException;
 use Zxing\NotFoundException;
-use Zxing\Qrcode\Decoder\Version;
 use Zxing\ResultPoint;
 use Zxing\ResultPointCallback;
 
@@ -54,7 +53,6 @@ public function __construct(private BitMatrix $image)
 	 */
 	final public function detect(array $hints = null): DetectorResult
 	{/*Map<DecodeHintType,?>*/
-
 		$resultPointCallback = ($hints !== null && array_key_exists('NEED_RESULT_POINT_CALLBACK', $hints)) ?
 			$hints['NEED_RESULT_POINT_CALLBACK'] : null;
 		/* resultPointCallback = hints == null ? null :
@@ -82,7 +80,6 @@ final protected function processFinderPatternInfo(FinderPatternInfo $info): \Zxi
 		$alignmentPattern = null;
 		// Anything above version 1 has an alignment pattern
 		if ((is_countable($provisionalVersion->getAlignmentPatternCenters()) ? count($provisionalVersion->getAlignmentPatternCenters()) : 0) > 0) {
-
 			// Guess where a "bottom right" finder pattern would have been
 			$bottomRightX = $topRight->getX() - $topLeft->getX() + $bottomLeft->getX();
 			$bottomRightY = $topRight->getY() - $topLeft->getY() + $bottomLeft->getY();
@@ -404,6 +401,9 @@ private static function createTransform(
 		);
 	}
 
+    /**
+     * @param BitMatrix $image
+     */
 	private static function sampleGrid(
 		$image,
 		PerspectiveTransform $transform,
@@ -414,6 +414,9 @@ private static function sampleGrid(
 		return $sampler->sampleGrid_($image, $dimension, $dimension, $transform);
 	}
 
+    /**
+     * @return BitMatrix
+     */
 	final protected function getImage()
 	{
 		return $this->image;
diff --git a/lib/Qrcode/Detector/FinderPattern.php b/lib/Qrcode/Detector/FinderPattern.php
index 7665302..ad6a4f2 100644
--- a/lib/Qrcode/Detector/FinderPattern.php
+++ b/lib/Qrcode/Detector/FinderPattern.php
@@ -17,7 +17,7 @@
 
 namespace Zxing\Qrcode\Detector;
 
-use  Zxing\ResultPoint;
+use Zxing\ResultPoint;
 
 /**
  * <p>Encapsulates a finder pattern, which are the three square patterns found in
diff --git a/lib/Qrcode/Detector/FinderPatternFinder.php b/lib/Qrcode/Detector/FinderPatternFinder.php
index f6b3b35..1a917a1 100644
--- a/lib/Qrcode/Detector/FinderPatternFinder.php
+++ b/lib/Qrcode/Detector/FinderPatternFinder.php
@@ -168,8 +168,8 @@ final public function find(array|null $hints): \Zxing\Qrcode\Detector\FinderPatt
 	}
 
 	/**
-	 * @param $stateCount ; count of black/white/black/white/black pixels just read
-	 * @param int[] $stateCount
+	 * @param $maxVariance ; count of black/white/black/white/black pixels just read
+	 * @param int[] $maxVariance
 	 *
 	 * @return bool iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios used by finder patterns to be considered a match
 	 *
diff --git a/lib/Qrcode/QRCodeReader.php b/lib/Qrcode/QRCodeReader.php
index 6d65741..1c549ed 100644
--- a/lib/Qrcode/QRCodeReader.php
+++ b/lib/Qrcode/QRCodeReader.php
@@ -43,7 +43,7 @@ public function __construct()
 	}
 
 	/**
-  * @param null         $hints
+  * @param array|null         $hints
   *
   * @return Result
   * @throws \Zxing\FormatException
diff --git a/lib/ResultPoint.php b/lib/ResultPoint.php
index 986f9dc..8533cd5 100644
--- a/lib/ResultPoint.php
+++ b/lib/ResultPoint.php
@@ -44,8 +44,7 @@ public function __construct($x, $y)
 	 */
 	public static function orderBestPatterns(array $patterns): array
 	{
-
-// Find distances between pattern centers
+		// Find distances between pattern centers
 		$zeroOneDistance = self::distance($patterns[0], $patterns[1]);
 		$oneTwoDistance = self::distance($patterns[1], $patterns[2]);
 		$zeroTwoDistance = self::distance($patterns[0], $patterns[2]);
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index a23d614..bd3a81f 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,11 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
-  <coverage processUncoveredFiles="true">
-    <include>
-      <directory suffix=".php">lib</directory>
-    </include>
-  </coverage>
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         bootstrap="./vendor/autoload.php"
+         xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd">
+
   <testsuite name="Tests">
-    <directory suffix="Test.php">tests</directory>
+    <directory>tests</directory>
   </testsuite>
+
+  <source>
+    <include>
+      <directory>lib</directory>
+    </include>
+  </source>
+
 </phpunit>
diff --git a/psalm.xml b/psalm.xml
index 52a75ee..1c9b4d3 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0"?>
 <psalm
     errorLevel="8"
-    resolveFromConfigFile="true"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="https://getpsalm.org/schema/config"
     xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
diff --git a/tests/QrReaderTest.php b/tests/QrReaderTest.php
index 68dd7b7..b48b481 100644
--- a/tests/QrReaderTest.php
+++ b/tests/QrReaderTest.php
@@ -26,7 +26,7 @@ public function testNoText()
 	{
 		$image = __DIR__ . "/qrcodes/empty.png";
 		$qrcode = new QrReader($image);
-		$this->assertSame(false, $qrcode->text());
+		$this->assertFalse($qrcode->text());
 	}
 
 	public function testText2()
@@ -38,7 +38,7 @@ public function testText2()
 			'NR_ALLOW_SKIP_ROWS' => 0
 		];
 		$qrcode->decode($hints);
-		$this->assertSame(null, $qrcode->getError());
+		$this->assertNull($qrcode->getError());
 		$this->assertInstanceOf(Result::class, $qrcode->getResult());
 		$this->assertEquals("https://www.gosuslugi.ru/covid-cert/verify/9770000014233333?lang=ru&ck=733a9d218d312fe134f1c2cc06e1a800", $qrcode->getResult()->getText());
 		$this->assertSame("https://www.gosuslugi.ru/covid-cert/verify/9770000014233333?lang=ru&ck=733a9d218d312fe134f1c2cc06e1a800", $qrcode->text($hints));
@@ -51,7 +51,7 @@ public function testText3()
 		$qrcode->decode([
 			'TRY_HARDER' => true
 		]);
-		$this->assertSame(null, $qrcode->getError());
+		$this->assertNull($qrcode->getError());
 		$this->assertSame("https://www.gosuslugi.ru/covid-cert/verify/9770000014233333?lang=ru&ck=733a9d218d312fe134f1c2cc06e1a800", $qrcode->text());
 	}