Loading src/Action/Functions.php +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Action; use DateTimeImmutable; class Functions { /** Loading src/Controller/HomeController.php +5 −4 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace App\Controller; use App\Action\Functions; use App\Validation\ArrayValidation; use DateTimeImmutable; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; Loading Loading @@ -41,7 +42,7 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/func3', name: 'home', methods: ['POST'])] #[Route('/func3', name: 'func3', methods: ['POST'])] public function home(Request $request): Response { $array = $request->get('arr'); Loading @@ -49,7 +50,7 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/func4', name: 'home', methods: ['POST'])] #[Route('/func4', name: 'func4', methods: ['POST'])] public function func4(Request $request): Response { $array = $request->get('arr'); Loading @@ -60,8 +61,8 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/{day}/{month}/{year}', name: 'home')] public function home(int $day, int $month, int $year): Response #[Route('/func5/{day}/{month}/{year}', name: 'func5')] public function func5(int $day, int $month, int $year): Response { $dateAsString = $year . "-" . $month . "-" . $day; try { Loading Loading
src/Action/Functions.php +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Action; use DateTimeImmutable; class Functions { /** Loading
src/Controller/HomeController.php +5 −4 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace App\Controller; use App\Action\Functions; use App\Validation\ArrayValidation; use DateTimeImmutable; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; Loading Loading @@ -41,7 +42,7 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/func3', name: 'home', methods: ['POST'])] #[Route('/func3', name: 'func3', methods: ['POST'])] public function home(Request $request): Response { $array = $request->get('arr'); Loading @@ -49,7 +50,7 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/func4', name: 'home', methods: ['POST'])] #[Route('/func4', name: 'func4', methods: ['POST'])] public function func4(Request $request): Response { $array = $request->get('arr'); Loading @@ -60,8 +61,8 @@ class HomeController extends AbstractController return $this->json($result); } #[Route('/{day}/{month}/{year}', name: 'home')] public function home(int $day, int $month, int $year): Response #[Route('/func5/{day}/{month}/{year}', name: 'func5')] public function func5(int $day, int $month, int $year): Response { $dateAsString = $year . "-" . $month . "-" . $day; try { Loading