Fixed inspection issues.

This commit is contained in:
Jan Böhmer 2020-03-29 22:47:25 +02:00
parent 0fe83c7b3a
commit eb9b24d5d7
20 changed files with 33 additions and 49 deletions

View file

@ -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'],

View file

@ -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'],

View file

@ -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

View file

@ -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 [

View file

@ -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!'];

View file

@ -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]];
}