mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-26 12:36:23 +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
|
@ -33,15 +33,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class PartAttachmentsColumn extends AbstractColumn
|
||||
{
|
||||
protected FAIconGenerator $FAIconGenerator;
|
||||
protected EntityURLGenerator $urlGenerator;
|
||||
protected AttachmentManager $attachmentManager;
|
||||
|
||||
public function __construct(FAIconGenerator $FAIconGenerator, EntityURLGenerator $urlGenerator, AttachmentManager $attachmentManager)
|
||||
public function __construct(protected FAIconGenerator $FAIconGenerator, protected EntityURLGenerator $urlGenerator, protected AttachmentManager $attachmentManager)
|
||||
{
|
||||
$this->FAIconGenerator = $FAIconGenerator;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->attachmentManager = $attachmentManager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,9 +54,7 @@ class PartAttachmentsColumn extends AbstractColumn
|
|||
throw new RuntimeException('$context must be a Part object!');
|
||||
}
|
||||
$tmp = '';
|
||||
$attachments = $context->getAttachments()->filter(function (Attachment $attachment) {
|
||||
return $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment);
|
||||
});
|
||||
$attachments = $context->getAttachments()->filter(fn(Attachment $attachment) => $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment));
|
||||
|
||||
$count = 5;
|
||||
foreach ($attachments as $attachment) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue