Loading .idea/sonarlint/issuestore/4/3/43dcb35f966f0fa054ba7993783bf64ca2be218c +3 −0 Original line number Diff line number Diff line php:S112"FDefine and throw a dedicated exception instead of using a generic one.(Û„”’þÿÿÿÿ8öžœÔî1J$47edde45-6969-4470-9c01-b4077dd7b5f4 php:S112²"FDefine and throw a dedicated exception instead of using a generic one.(Û„”’þÿÿÿÿ8öžœÔî1J$5eb02a27-89bd-4e34-8e30-b9f86d63a21d No newline at end of file src/Controller/HomeController.php +5 −4 Original line number Diff line number Diff line Loading @@ -106,12 +106,13 @@ class HomeController extends AbstractController return $response; } #[Route('/func9/{fileName}', name: 'func9')] public function func9(string $fileName): Response // text.txt #[Route('/readFileLineByLine', name: 'readFileLineByLine')] public function readFileLineByLine(Request $request, FileUploader $fileUploader): Response // text.txt { $filePath = $this->getParameter('kernel.project_dir') . "/public/files/" . $fileName; $file = $request->files->get('file'); $fileName = $fileUploader->upload($file); $text = ""; foreach ($this->functions->readFileLineByLine($filePath) as $line) { foreach ($this->functions->readFileLineByLine($fileName) as $line) { $text .= $line; } $response = new JsonResponse($text); Loading Loading
.idea/sonarlint/issuestore/4/3/43dcb35f966f0fa054ba7993783bf64ca2be218c +3 −0 Original line number Diff line number Diff line php:S112"FDefine and throw a dedicated exception instead of using a generic one.(Û„”’þÿÿÿÿ8öžœÔî1J$47edde45-6969-4470-9c01-b4077dd7b5f4 php:S112²"FDefine and throw a dedicated exception instead of using a generic one.(Û„”’þÿÿÿÿ8öžœÔî1J$5eb02a27-89bd-4e34-8e30-b9f86d63a21d No newline at end of file
src/Controller/HomeController.php +5 −4 Original line number Diff line number Diff line Loading @@ -106,12 +106,13 @@ class HomeController extends AbstractController return $response; } #[Route('/func9/{fileName}', name: 'func9')] public function func9(string $fileName): Response // text.txt #[Route('/readFileLineByLine', name: 'readFileLineByLine')] public function readFileLineByLine(Request $request, FileUploader $fileUploader): Response // text.txt { $filePath = $this->getParameter('kernel.project_dir') . "/public/files/" . $fileName; $file = $request->files->get('file'); $fileName = $fileUploader->upload($file); $text = ""; foreach ($this->functions->readFileLineByLine($filePath) as $line) { foreach ($this->functions->readFileLineByLine($fileName) as $line) { $text .= $line; } $response = new JsonResponse($text); Loading