mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 17:55:03 +02:00
Fixed inspection issues.
This commit is contained in:
parent
0fe83c7b3a
commit
eb9b24d5d7
20 changed files with 33 additions and 49 deletions
|
@ -95,7 +95,7 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
$this->assertNull(self::$service->parameterToAbsolutePath('/./this/one/too'));
|
||||
}
|
||||
|
||||
public function placeholderDataProvider()
|
||||
public function placeholderDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['%FOOTPRINTS%/test/test.jpg', self::$footprint_path.'/test/test.jpg'],
|
||||
|
@ -117,7 +117,7 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
];
|
||||
}
|
||||
|
||||
public function realPathDataProvider()
|
||||
public function realPathDataProvider(): array
|
||||
{
|
||||
return [
|
||||
[self::$media_path.'/test/img.jpg', '%MEDIA%/test/img.jpg'],
|
||||
|
|
|
@ -58,7 +58,7 @@ class AttachmentURLGeneratorTest extends WebTestCase
|
|||
self::$service = self::$container->get(AttachmentURLGenerator::class);
|
||||
}
|
||||
|
||||
public function dataProvider()
|
||||
public function dataProvider(): array
|
||||
{
|
||||
return [
|
||||
['/public/test.jpg', 'test.jpg'],
|
||||
|
|
|
@ -63,7 +63,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase
|
|||
self::$service = self::$container->get(BuiltinAttachmentsFinder::class);
|
||||
}
|
||||
|
||||
public function dataProvider()
|
||||
public function dataProvider(): array
|
||||
{
|
||||
return [
|
||||
//No value should return empty array
|
||||
|
|
|
@ -109,7 +109,7 @@ class PermissionResolverTest extends WebTestCase
|
|||
$this->group->method('getParent')->willReturn($parent_group);
|
||||
}
|
||||
|
||||
public function getPermissionNames()
|
||||
public function getPermissionNames(): array
|
||||
{
|
||||
//List all possible operation names.
|
||||
return [
|
||||
|
|
|
@ -64,7 +64,7 @@ class PricedetailHelperTest extends WebTestCase
|
|||
$this->service = self::$container->get(PricedetailHelper::class);
|
||||
}
|
||||
|
||||
public function maxDiscountAmountDataProvider()
|
||||
public function maxDiscountAmountDataProvider(): ?\Generator
|
||||
{
|
||||
$part = new Part();
|
||||
yield [$part, null, 'Part without any orderdetails failed!'];
|
||||
|
|
|
@ -66,7 +66,7 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
new BackupCodeGenerator(4, 10);
|
||||
}
|
||||
|
||||
public function codeLengthDataProvider()
|
||||
public function codeLengthDataProvider(): array
|
||||
{
|
||||
return [[6], [8], [10], [16]];
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
$this->assertRegExp("/^([a-f0-9]){{$code_length}}\$/", $generator->generateSingleCode());
|
||||
}
|
||||
|
||||
public function codeCountDataProvider()
|
||||
public function codeCountDataProvider(): array
|
||||
{
|
||||
return [[2], [8], [10]];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue