This repository was archived by the owner on Oct 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +2
-14
lines changed
Twig/Components/Challenge Expand file tree Collapse file tree 4 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,6 @@ public function likes(
9999
100100 private function isCommentFeatureEnabled (): bool
101101 {
102- $ comment = $ this ->getParameter ('app.features.comment ' );
103- if (!\is_bool ($ comment )) {
104- throw new \RuntimeException ('The "app.features.comment" parameter must be a boolean. ' );
105- }
106-
107- return $ comment ;
102+ return $ this ->getParameter ('app.features.comment ' );
108103 }
109104}
Original file line number Diff line number Diff line change @@ -21,10 +21,7 @@ class ProfileController extends AbstractController
2121{
2222 public function isProfileEditable (): bool
2323 {
24- $ isProfileEditable = $ this ->getParameter ('app.features.editable-profile ' );
25- \assert (\is_bool ($ isProfileEditable ));
26-
27- return $ isProfileEditable ;
24+ return $ this ->getParameter ('app.features.editable-profile ' );
2825 }
2926
3027 #[Route('/profile ' , name: 'app_profile ' )]
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ protected function instantiateForm(): FormInterface
5757 public function save (EntityManagerInterface $ entityManager , ParameterBagInterface $ parameterBag ): void
5858 {
5959 $ appFeatureComment = $ parameterBag ->get ('app.features.comment ' );
60- \assert (\is_bool ($ appFeatureComment ));
61-
6260 if (!$ appFeatureComment ) {
6361 throw new BadRequestHttpException ('Comment feature is disabled. ' );
6462 }
Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ public function instruct(
6767 ParameterBagInterface $ parameterBag ,
6868 ): void {
6969 $ appFeatureHint = $ parameterBag ->get ('app.features.hint ' );
70- \assert (\is_bool ($ appFeatureHint ));
71-
7270 if (!$ appFeatureHint ) {
7371 throw new BadRequestHttpException ('Hint feature is disabled. ' );
7472 }
You can’t perform that action at this time.
0 commit comments