Ptps controller 6
4 unresolved threads
4 unresolved threads
Merge request reports
Activity
added 20 commits
- d4230faa...498dda71 - 10 earlier commits
- ca5ff1b7 - Merge branch 'PTPS_Controller_1' into PTPS_Controller_2
- 86264a54 - refactoring
- cd994e0f - Merge branch 'PTPS_Controller_2' into PTPS_Controller_3
- 6274eb5d - refactoring
- 8d956fe9 - Merge branch 'PTPS_Controller_3' into PTPS_Controller_4
- e8304f56 - refactoring
- 05c54a3a - Merge branch 'PTPS_Controller_4' into PTPS_Controller_5
- 5727e87f - refactoring
- 1c2f2d02 - Merge branch 'PTPS_Controller_5' into PTPS_Controller_6
- ecb2ff0f - refactoring
Toggle commit list9 13 class HomeController extends AbstractController 10 14 { 11 private function sortPrice(array $array): array 15 private Functions $functions; 16 17 public function __construct(Functions $functions) 12 18 { 13 $price = []; 14 $count = []; 15 foreach ($array as $key => $row) { 16 $price[$key] = $row['price']; 17 $count[$key] = $row['count']; 18 } 19 array_multisort($price, SORT_DESC, $count, SORT_ASC, $array); 20 return $array; 19 $this->functions = $functions; changed this line in version 5 of the diff
62 } 63 64 #[Route('/func5/{day}/{month}/{year}', name: 'func5')] 65 public function func5(int $day, int $month, int $year): Response 66 { 67 $dateAsString = $year . "-" . $month . "-" . $day; 68 try { 69 $result = $this->functions->howDaysToNy(new DateTimeImmutable($dateAsString)); 70 } catch (\Exception $e) { 71 return new Response($e->getMessage()); 72 } 73 return $this->json(["Days before NY:" => $result]); 74 } 75 76 #[Route('/func6/{year}', name: 'func6', methods: ['GET'])] 77 public function func6(int $year): Response changed this line in version 5 of the diff
66 { 67 $dateAsString = $year . "-" . $month . "-" . $day; 68 try { 69 $result = $this->functions->howDaysToNy(new DateTimeImmutable($dateAsString)); 70 } catch (\Exception $e) { 71 return new Response($e->getMessage()); 72 } 73 return $this->json(["Days before NY:" => $result]); 74 } 75 76 #[Route('/func6/{year}', name: 'func6', methods: ['GET'])] 77 public function func6(int $year): Response 78 { 79 $fridays = array(); 80 try { 81 foreach ($this->functions->countFriday13($year) as $date) { added 4 commits
-
eb48a934...a11f1d90 - 3 commits from branch
main
- 5f66fef1 - Merge branch 'main' into 'PTPS_Controller_6'
-
eb48a934...a11f1d90 - 3 commits from branch
60 )] 61 public function howDaysToNy(int $day, int $month, int $year): Response 62 { 63 $dateAsString = $year . "-" . $month . "-" . $day; 64 try { 65 $result = $this->functions->howDaysToNy(new DateTimeImmutable($dateAsString)); 66 } catch (\Exception $e) { 67 return new Response($e->getMessage()); 68 } 69 return $this->json(["Days before NY:" => $result]); 70 } 71 72 #[Route( 73 '/countFriday13/{year}', 74 name: 'countFriday13', 75 requirements: ['year' => '(?<!-)(?<!\d)\d+'], changed this line in version 8 of the diff
added 2 commits
added 13 commits
-
9448460d...c9b88dcf - 12 commits from branch
main
- ac4beafa - Merge branch 'main' into 'PTPS_Controller_6'
-
9448460d...c9b88dcf - 12 commits from branch
added 12 commits
-
ac4beafa...2de0012a - 6 commits from branch
main
- da409f72 - Merge branch 'main' into 'PTPS_Controller_5'
- 7ef5f025 - Merge branch 'PTPS_Controller_5' of...
- cd069166 - Merge branch 'PTPS_Controller_5' of...
- ea083e60 - Merge branch 'PTPS_Controller_5' of...
- e628f172 - Merge branch 'PTPS_Controller_5' into PTPS_Controller_6
- a36bd71e - Merge branch 'PTPS_Controller_6' of...
Toggle commit list-
ac4beafa...2de0012a - 6 commits from branch
mentioned in commit ca9bf67d
Please register or sign in to reply