diff --git a/.idea/sonarlint/issuestore/a/d/ad8b439416d1e02614f47c5b471c7c4e587dca82 b/.idea/sonarlint/issuestore/a/d/ad8b439416d1e02614f47c5b471c7c4e587dca82
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ea6a1d3a943f9933cb46aeef000fd4d6b0d887cb 100644
--- a/.idea/sonarlint/issuestore/a/d/ad8b439416d1e02614f47c5b471c7c4e587dca82
+++ b/.idea/sonarlint/issuestore/a/d/ad8b439416d1e02614f47c5b471c7c4e587dca82
@@ -0,0 +1,2 @@
+
+vphp:S121"0Add curly braces around the nested statement(s).(ïŠí±üÿÿÿÿ8ÌÆ‹ì1J$562771d0-0b91-4f4c-beaf-90c25c2ac224
\ No newline at end of file
diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php
index 51d19fad26bd11dfc3d01d43ebccdc5c14b1d489..168fb510bea0177408d5efa37994e4a7cffd12e3 100644
--- a/src/Controller/HomeController.php
+++ b/src/Controller/HomeController.php
@@ -12,26 +12,26 @@ use Symfony\Component\Routing\Attribute\Route;
 
 class HomeController extends AbstractController
 {
-    private function readLogFile(string $fileName): string {
+    private function readFileLineByLine(string $fileName): iterable  {
         $filePath = $this->getParameter('kernel.project_dir') . "/public/files/" . $fileName;
         if (file_exists($filePath)) {
-            $text = "";
             $file = fopen($filePath, "r");
             while(!feof($file)) {
-                $line = fgets($file);
-                $text .= $line;
+                yield fgets($file);
             }
             fclose($file);
-            return $text;
         }
-        return "Такого файла не существует.";
+        else yield "Такого файла не существует.";
     }
 
 
     #[Route('/{fileName}', name: 'home')]
     public function home(string $fileName): Response // text.txt
     {
-        $text = $this->readLogFile($fileName);
+        $text = "";
+        foreach($this->readFileLineByLine($fileName) as $line) {
+            $text .= $line;
+        }
         return $this->render('home.html.twig', ['text' => $text]);
     }
 }