mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 13:49:33 +00:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
|
@ -49,6 +49,7 @@ use ReflectionClass;
|
|||
/**
|
||||
* @template TEntityClass of AbstractDBElement
|
||||
* @extends EntityRepository<TEntityClass>
|
||||
* @see \App\Tests\Repository\DBElementRepositoryTest
|
||||
*/
|
||||
class DBElementRepository extends EntityRepository
|
||||
{
|
||||
|
|
@ -143,9 +144,7 @@ class DBElementRepository extends EntityRepository
|
|||
*/
|
||||
protected function sortResultArrayByIDArray(array &$result_array, array $ids): void
|
||||
{
|
||||
usort($result_array, static function (AbstractDBElement $a, AbstractDBElement $b) use ($ids) {
|
||||
return array_search($a->getID(), $ids, true) <=> array_search($b->getID(), $ids, true);
|
||||
});
|
||||
usort($result_array, static fn(AbstractDBElement $a, AbstractDBElement $b) => array_search($a->getID(), $ids, true) <=> array_search($b->getID(), $ids, true));
|
||||
}
|
||||
|
||||
protected function setField(AbstractDBElement $element, string $field, int $new_value): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue