mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-07 08:54:36 +02:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
@ -30,6 +30,7 @@ use App\Services\Attachments\AttachmentManager;
|
|||
use App\Services\EntityURLGenerator;
|
||||
use App\Services\FAIconGenerator;
|
||||
use Omines\DataTablesBundle\Column\AbstractColumn;
|
||||
use RuntimeException;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PartAttachmentsColumn extends AbstractColumn
|
||||
|
@ -60,7 +61,7 @@ class PartAttachmentsColumn extends AbstractColumn
|
|||
public function render($value, $context)
|
||||
{
|
||||
if (! $context instanceof Part) {
|
||||
throw new \RuntimeException('$context must be a Part object!');
|
||||
throw new RuntimeException('$context must be a Part object!');
|
||||
}
|
||||
$tmp = '';
|
||||
$attachments = $context->getAttachments()->filter(function (Attachment $attachment) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue