mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 03:49:31 +00:00
Fixed code style.
This commit is contained in:
parent
1aed1d1d26
commit
9a7223a301
142 changed files with 534 additions and 716 deletions
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
namespace App\Tests\Security\Annotations;
|
||||
|
||||
|
||||
use App\Entity\Attachments\AttachmentType;
|
||||
use App\Security\Annotations\ColumnSecurity;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
|
@ -48,7 +47,7 @@ class ColumnSecurityTest extends TestCase
|
|||
$this->assertEquals('prefix.overwritten', $annotation->getEditOperationName());
|
||||
}
|
||||
|
||||
public function placeholderScalarDataProvider() : array
|
||||
public function placeholderScalarDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['string', '???'],
|
||||
|
|
@ -64,7 +63,7 @@ class ColumnSecurityTest extends TestCase
|
|||
|
||||
/**
|
||||
* @dataProvider placeholderScalarDataProvider
|
||||
* @param string $type
|
||||
*
|
||||
* @param $expected_value
|
||||
*/
|
||||
public function testGetPlaceholderScalar(string $type, $expected_value)
|
||||
|
|
@ -84,7 +83,7 @@ class ColumnSecurityTest extends TestCase
|
|||
$this->assertCount(1, $annotation->getPlaceholder());
|
||||
|
||||
//If a placeholder is specified we allow every type
|
||||
$annotation->type = "type2";
|
||||
$annotation->type = 'type2';
|
||||
$annotation->placeholder = 'invalid';
|
||||
$this->assertEquals('invalid', $annotation->getPlaceholder());
|
||||
}
|
||||
|
|
@ -104,4 +103,4 @@ class ColumnSecurityTest extends TestCase
|
|||
$this->assertInstanceOf(AttachmentType::class, $placeholder);
|
||||
$this->assertEquals('test', $placeholder->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
namespace App\Tests\Security;
|
||||
|
||||
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Security\UserChecker;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
|
@ -31,7 +30,7 @@ class UserCheckerTest extends TestCase
|
|||
{
|
||||
protected $service;
|
||||
|
||||
public function setUp() : void
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->service = new UserChecker();
|
||||
}
|
||||
|
|
@ -49,4 +48,4 @@ class UserCheckerTest extends TestCase
|
|||
$this->expectException(DisabledException::class);
|
||||
$this->service->checkPostAuth($user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue