Fixed PHPstan issues

This commit is contained in:
Jan Böhmer 2022-11-27 16:53:44 +01:00
parent 2554120e6e
commit df11f62a2f
5 changed files with 11 additions and 4 deletions

View file

@ -145,6 +145,8 @@ class TreeController extends AbstractController
{
if ($this->isGranted('@parts.read') && $this->isGranted('@suppliers.read')) {
$tree = $this->treeGenerator->getTreeView(Supplier::class, $supplier, 'list_parts_root');
} else {
return new JsonResponse("Access denied", 403);
}
return new JsonResponse($tree);