diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index c19c1c7..a59ac40 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -17,8 +17,8 @@ final class MainController extends AbstractController { $gitDir = $this->getParameter('kernel.project_dir') . '/var/data'; - new Process(['git', '-C', $gitDir, 'fetch'])->mustRun(); - new Process(['git', '-C', $gitDir, 'reset', '--hard', 'FETCH_HEAD'])->mustRun(); + (new Process(['git', '-C', $gitDir, 'fetch']))->mustRun(); + (new Process(['git', '-C', $gitDir, 'reset', '--hard', 'FETCH_HEAD']))->mustRun(); return new Response('Updated.'); } @@ -75,7 +75,7 @@ final class MainController extends AbstractController 'path' => $path, 'contents' => $contents, 'tree' => $tree, - 'version' => new Process(['git', '-C', $gitDir, 'log', '-1', '--oneline'])->mustRun()->getOutput(), + 'version' => (new Process(['git', '-C', $gitDir, 'log', '-1', '--oneline']))->mustRun()->getOutput(), ]); } }