forked from mirror/Part-DB.Part-DB-server
Fixed inspection issues.
This commit is contained in:
parent
0fe83c7b3a
commit
eb9b24d5d7
20 changed files with 33 additions and 49 deletions
|
@ -145,7 +145,7 @@ class AttachmentTest extends TestCase
|
|||
$attachment->setElement($element);
|
||||
}
|
||||
|
||||
public function externalDataProvider()
|
||||
public function externalDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['', false],
|
||||
|
@ -170,7 +170,7 @@ class AttachmentTest extends TestCase
|
|||
$this->assertSame($expected, $attachment->isExternal());
|
||||
}
|
||||
|
||||
public function extensionDataProvider()
|
||||
public function extensionDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['%MEDIA%/foo/bar.txt', null, 'txt'],
|
||||
|
@ -197,7 +197,7 @@ class AttachmentTest extends TestCase
|
|||
$this->assertSame($expected, $attachment->getExtension());
|
||||
}
|
||||
|
||||
public function pictureDataProvider()
|
||||
public function pictureDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['%MEDIA%/foo/bar.txt', false],
|
||||
|
@ -221,7 +221,7 @@ class AttachmentTest extends TestCase
|
|||
$this->assertSame($expected, $attachment->isPicture());
|
||||
}
|
||||
|
||||
public function builtinDataProvider()
|
||||
public function builtinDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['', false],
|
||||
|
@ -243,7 +243,7 @@ class AttachmentTest extends TestCase
|
|||
$this->assertSame($expected, $attachment->isBuiltIn());
|
||||
}
|
||||
|
||||
public function hostDataProvider()
|
||||
public function hostDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['%MEDIA%/foo/bar.txt', null],
|
||||
|
@ -262,7 +262,7 @@ class AttachmentTest extends TestCase
|
|||
$this->assertSame($expected, $attachment->getHost());
|
||||
}
|
||||
|
||||
public function filenameProvider()
|
||||
public function filenameProvider(): array
|
||||
{
|
||||
return [
|
||||
['%MEDIA%/foo/bar.txt', null, 'bar.txt'],
|
||||
|
|
|
@ -139,7 +139,7 @@ class AbstractLogEntryTest extends TestCase
|
|||
$this->assertSame(10, $log->getTargetID());
|
||||
|
||||
$log->setTargetElement(null);
|
||||
$this->assertSame(null, $log->getTargetClass());
|
||||
$this->assertSame(null, $log->getTargetID());
|
||||
$this->assertNull($log->getTargetClass());
|
||||
$this->assertNull($log->getTargetID());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ use App\Entity\Attachments\AttachmentType;
|
|||
use App\Entity\Parts\Category;
|
||||
use InvalidArgumentException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Yaml\Tests\A;
|
||||
|
||||
/**
|
||||
* Test StructuralDBElement entities.
|
||||
|
|
|
@ -43,7 +43,6 @@ declare(strict_types=1);
|
|||
namespace App\Tests\Entity\UserSystem;
|
||||
|
||||
use App\Entity\UserSystem\PermissionsEmbed;
|
||||
use Doctrine\ORM\Mapping\Embedded;
|
||||
use InvalidArgumentException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use ReflectionClass;
|
||||
|
@ -137,7 +136,7 @@ class PermissionsEmbedTest extends TestCase
|
|||
$embed->getPermissionValue('parts', 1);
|
||||
}
|
||||
|
||||
public function getStatesBINARY()
|
||||
public function getStatesBINARY(): array
|
||||
{
|
||||
return [
|
||||
'ALLOW' => [PermissionsEmbed::ALLOW],
|
||||
|
@ -147,7 +146,7 @@ class PermissionsEmbedTest extends TestCase
|
|||
];
|
||||
}
|
||||
|
||||
public function getStatesBOOL()
|
||||
public function getStatesBOOL(): array
|
||||
{
|
||||
return [
|
||||
'ALLOW' => [true],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue