diff --git a/psalm.xml b/psalm.xml index b27a5f8ba..02cb717c4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -15,6 +15,7 @@ + diff --git a/tests/RecordManagerTest/Base/Controller/CreatePreviewTest.php b/tests/RecordManagerTest/Base/Controller/CreatePreviewTest.php index e8f542e2f..a59116cc5 100644 --- a/tests/RecordManagerTest/Base/Controller/CreatePreviewTest.php +++ b/tests/RecordManagerTest/Base/Controller/CreatePreviewTest.php @@ -74,7 +74,7 @@ class CreatePreviewTest extends \PHPUnit\Framework\TestCase public function testCreatePreview() { $record = $this->getFixture('Controller/CreatePreview/preview_marc.xml'); - $preview = $this->getCreatePreview($record); + $preview = $this->getCreatePreview(); $result = $preview->launch( $record, diff --git a/tests/RecordManagerTest/Base/Record/CreateSampleRecordTrait.php b/tests/RecordManagerTest/Base/Record/CreateSampleRecordTrait.php index cce17d8dd..054ab66f3 100644 --- a/tests/RecordManagerTest/Base/Record/CreateSampleRecordTrait.php +++ b/tests/RecordManagerTest/Base/Record/CreateSampleRecordTrait.php @@ -135,18 +135,18 @@ protected function createMarcRecord( string $module = 'Base', array $constructorParams = [] ) { + $baseParams = [ + function ($data) { + return new \RecordManager\Base\Marc\Marc($data); + }, + new FormatCalculator(), + ]; return $this->createRecord( $class, $sample, $dsConfig, $module, - [ - function ($data) { - return new \RecordManager\Base\Marc\Marc($data); - }, - new FormatCalculator(), - ...$constructorParams, - ] + array_merge($baseParams, $constructorParams), ); } } diff --git a/tests/RecordManagerTest/Base/Utils/MetadataUtilsTest.php b/tests/RecordManagerTest/Base/Utils/MetadataUtilsTest.php index cbed2fdde..11ca80a70 100644 --- a/tests/RecordManagerTest/Base/Utils/MetadataUtilsTest.php +++ b/tests/RecordManagerTest/Base/Utils/MetadataUtilsTest.php @@ -309,7 +309,7 @@ public function testCoordinateToDecimal() // Test by rounding to lowest precision for PHP 8 compatibility // (see https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L584#L587): - $precision = min(ini_get('precision'), ini_get('serialize_precision')) ?: 15; + $precision = (int)(min(ini_get('precision'), ini_get('serialize_precision')) ?: 15); foreach ($values as $from => $to) { $this->assertEquals( is_string($to) ? $to : round($to, $precision),