mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -91,16 +91,14 @@ class PermissionManagerTest extends WebTestCase
|
|||
$this->group->method('getParent')->willReturn($parent_group);
|
||||
}
|
||||
|
||||
public function getPermissionNames(): array
|
||||
public function getPermissionNames(): \Iterator
|
||||
{
|
||||
//List some permission names
|
||||
return [
|
||||
['parts'],
|
||||
['system'],
|
||||
['footprints'],
|
||||
['suppliers'],
|
||||
['tools']
|
||||
];
|
||||
yield ['parts'];
|
||||
yield ['system'];
|
||||
yield ['footprints'];
|
||||
yield ['suppliers'];
|
||||
yield ['tools'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,9 +46,12 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
new BackupCodeGenerator(4, 10);
|
||||
}
|
||||
|
||||
public function codeLengthDataProvider(): array
|
||||
public function codeLengthDataProvider(): \Iterator
|
||||
{
|
||||
return [[6], [8], [10], [16]];
|
||||
yield [6];
|
||||
yield [8];
|
||||
yield [10];
|
||||
yield [16];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,9 +63,11 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
$this->assertMatchesRegularExpression("/^([a-f0-9]){{$code_length}}\$/", $generator->generateSingleCode());
|
||||
}
|
||||
|
||||
public function codeCountDataProvider(): array
|
||||
public function codeCountDataProvider(): \Iterator
|
||||
{
|
||||
return [[2], [8], [10]];
|
||||
yield [2];
|
||||
yield [8];
|
||||
yield [10];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -17,7 +20,6 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Services\UserSystem;
|
||||
|
||||
use App\Entity\UserSystem\ApiToken;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue