mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -39,11 +39,8 @@ use function Symfony\Component\String\u;
|
|||
*/
|
||||
class EntityExporter
|
||||
{
|
||||
protected SerializerInterface $serializer;
|
||||
|
||||
public function __construct(SerializerInterface $serializer)
|
||||
public function __construct(protected SerializerInterface $serializer)
|
||||
{
|
||||
$this->serializer = $serializer;
|
||||
}
|
||||
|
||||
protected function configureOptions(OptionsResolver $resolver): void
|
||||
|
@ -67,7 +64,7 @@ class EntityExporter
|
|||
* @param array $options The options to use for exporting
|
||||
* @return string The serialized data
|
||||
*/
|
||||
public function exportEntities($entities, array $options): string
|
||||
public function exportEntities(\App\Entity\Base\AbstractNamedDBElement|array $entities, array $options): string
|
||||
{
|
||||
if (!is_array($entities)) {
|
||||
$entities = [$entities];
|
||||
|
@ -111,7 +108,7 @@ class EntityExporter
|
|||
*
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function exportEntityFromRequest($entities, Request $request): Response
|
||||
public function exportEntityFromRequest(\App\Entity\Base\AbstractNamedDBElement|array $entities, Request $request): Response
|
||||
{
|
||||
$options = [
|
||||
'format' => $request->get('format') ?? 'json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue