@@ -35,8 +35,8 @@ |
||
35 | 35 | |
36 | 36 | $majorProblems = $symfonyRequirements->getFailedRequirements(); |
37 | 37 | $minorProblems = $symfonyRequirements->getFailedRecommendations(); |
38 | -$hasMajorProblems = (bool)count($majorProblems); |
|
39 | -$hasMinorProblems = (bool)count($minorProblems); |
|
38 | +$hasMajorProblems = (bool) count($majorProblems); |
|
39 | +$hasMinorProblems = (bool) count($minorProblems); |
|
40 | 40 | |
41 | 41 | ?> |
42 | 42 | <!DOCTYPE html> |
@@ -511,7 +511,10 @@ discard block |
||
511 | 511 | <?php if ($hasMinorProblems): ?> |
512 | 512 | <h2>Recommendations</h2> |
513 | 513 | <p> |
514 | - <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your |
|
514 | + <?php if ($hasMajorProblems): ?>Additionally, to<?php else { |
|
515 | + : ?>To<?php endif; |
|
516 | +} |
|
517 | +?> enhance your |
|
515 | 518 | Symfony experience, |
516 | 519 | it’s recommended that you fix the following: |
517 | 520 | </p> |
@@ -529,9 +532,12 @@ discard block |
||
529 | 532 | <?php if ($symfonyRequirements->getPhpIniPath()): ?> |
530 | 533 | Changes to the <strong>php.ini</strong> file must be done in " |
531 | 534 | <strong><?php echo $symfonyRequirements->getPhpIniPath(); ?></strong>". |
532 | - <?php else: ?> |
|
535 | + <?php else { |
|
536 | + : ?> |
|
533 | 537 | To change settings, create a "<strong>php.ini</strong>". |
534 | - <?php endif; ?> |
|
538 | + <?php endif; |
|
539 | +} |
|
540 | +?> |
|
535 | 541 | </p> |
536 | 542 | <?php endif; ?> |
537 | 543 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ); |
40 | 40 | |
41 | 41 | //build yarn stuff & upload |
42 | -task('frontend:build', function () { |
|
42 | +task('frontend:build', function() { |
|
43 | 43 | runLocally('yarn install'); |
44 | 44 | runLocally('yarn upgrade'); |
45 | 45 | runLocally('yarn run encore production'); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | })->desc('Build frontend assets'); |
48 | 48 | |
49 | 49 | // kill php processes to ensure symlinks are refreshed |
50 | -task('deploy:refresh_symlink', function () { |
|
50 | +task('deploy:refresh_symlink', function() { |
|
51 | 51 | run('killall -9 php-cgi'); //kill all php processes so symlink is refreshed |
52 | 52 | })->desc('Refreshing symlink'); |
53 | 53 | //frontend stuff |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $startEntity = clone $defaultEntity; |
63 | 63 | |
64 | 64 | //create persist callable |
65 | - $myOnSuccessCallable = function ($form) use ($defaultEntity, $beforeCreateCallable, $successfulText, $formType, $startEntity, $buttonLabel) { |
|
65 | + $myOnSuccessCallable = function($form) use ($defaultEntity, $beforeCreateCallable, $successfulText, $formType, $startEntity, $buttonLabel) { |
|
66 | 66 | $manager = $this->getDoctrine()->getManager(); |
67 | 67 | |
68 | 68 | if (!\is_callable($beforeCreateCallable) || false !== $beforeCreateCallable($manager)) { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $successfulText = $translator->trans('form.successful.updated', [], 'framework'); |
105 | 105 | |
106 | 106 | //create persist callable |
107 | - $myOnSuccessCallable = function ($form) use ($entity, $beforeUpdateCallable, $successfulText) { |
|
107 | + $myOnSuccessCallable = function($form) use ($entity, $beforeUpdateCallable, $successfulText) { |
|
108 | 108 | $manager = $this->getDoctrine()->getManager(); |
109 | 109 | |
110 | 110 | if (!\is_callable($beforeUpdateCallable) || false !== $beforeUpdateCallable($manager)) { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $translator->trans('form.submit_buttons.delete', [], 'framework'), |
146 | 146 | $translator->trans('form.successful.deleted', [], 'framework'), |
147 | 147 | $beforeDeleteCallable ?? |
148 | - function () { |
|
148 | + function() { |
|
149 | 149 | return true; |
150 | 150 | } |
151 | 151 | ); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | private function handleDeleteFormInternal(Request $request, BaseEntity $entity, $formType, $buttonLabel, $successText, $beforeDeleteCallable) |
167 | 167 | { |
168 | - $myOnSuccessCallable = function ($form) use ($entity, $successText, $beforeDeleteCallable) { |
|
168 | + $myOnSuccessCallable = function($form) use ($entity, $successText, $beforeDeleteCallable) { |
|
169 | 169 | $manager = $this->getDoctrine()->getManager(); |
170 | 170 | |
171 | 171 | if (false !== $beforeDeleteCallable($entity, $manager)) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->createForm(RecoverType::class) |
82 | 82 | ->add('form.recover', SubmitType::class, ['translation_domain' => 'login', 'label' => 'recover.title']), |
83 | 83 | $request, |
84 | - function ($form) use ($emailService, $translator, $logger) { |
|
84 | + function($form) use ($emailService, $translator, $logger) { |
|
85 | 85 | /* @var FormInterface $form */ |
86 | 86 | |
87 | 87 | //display success |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $this->createForm(ChangePasswordType::class, $user, ['data_class' => FrontendUser::class]) |
153 | 153 | ->add('form.set_password', SubmitType::class, ['translation_domain' => 'login', 'label' => 'reset.title']), |
154 | 154 | $request, |
155 | - function ($form) use ($user, $translator, $request) { |
|
155 | + function($form) use ($user, $translator, $request) { |
|
156 | 156 | //set valid password if possible |
157 | 157 | if (!$this->setNewPasswordIfValid($user)) { |
158 | 158 | return $form; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $this->createForm(ChangePasswordType::class, $user) |
47 | 47 | ->add('form.change_password', SubmitType::class, ['translation_domain' => 'account', 'label' => 'index.change_password']), |
48 | 48 | $request, |
49 | - function ($form) use ($user) { |
|
49 | + function($form) use ($user) { |
|
50 | 50 | if ($this->setNewPasswordIfValid($user)) { |
51 | 51 | $this->fastSave($user); |
52 | 52 | $this->displaySuccess($this->getTranslator()->trans('index.success.password_changed', [], 'account')); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->createForm(UpdateSelfType::class, $user) |
63 | 63 | ->add('form.save', SubmitType::class, ['translation_domain' => 'framework', 'label' => 'form.submit_buttons.update']), |
64 | 64 | $request, |
65 | - function ($form) use ($request, $user, $translator, $oldEmail) { |
|
65 | + function($form) use ($request, $user, $translator, $oldEmail) { |
|
66 | 66 | //if email changed, ensure it is not taken already |
67 | 67 | if ($user->getEmail() !== $oldEmail) { |
68 | 68 | $exitingUser = $this->getDoctrine()->getRepository(FrontendUser::class)->findOneBy(['email' => $user->getEmail()]); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $this->createForm(RegisterType::class, $user) |
42 | 42 | ->add('form.register', SubmitType::class, ['translation_domain' => 'register', 'label' => 'index.title']), |
43 | 43 | $request, |
44 | - function ($form) use ($request, $translator, $user) { |
|
44 | + function($form) use ($request, $translator, $user) { |
|
45 | 45 | /* @var FormInterface $form */ |
46 | 46 | |
47 | 47 | //set valid password if possible |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function indexAction(Request $request, TranslatorInterface $translator, EmailServiceInterface $emailService) |
40 | 40 | { |
41 | 41 | //prefill contact request with user data |
42 | - $createContactRequest = function () { |
|
42 | + $createContactRequest = function() { |
|
43 | 43 | $contactRequest = new ContactRequest(); |
44 | 44 | if ($this->getUser() instanceof FrontendUser) { |
45 | 45 | $contactRequest->setName($this->getUser()->getFullName()); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $contactRequest = $createContactRequest(); |
52 | 52 | |
53 | 53 | //reuse create form logic |
54 | - $createForm = function ($contactRequest) { |
|
54 | + $createForm = function($contactRequest) { |
|
55 | 55 | return $this->createForm(ContactRequestType::class, $contactRequest) |
56 | 56 | ->add('form.send', SubmitType::class, ['translation_domain' => 'contact', 'label' => 'index.send_mail']); |
57 | 57 | }; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $form = $this->handleForm( |
61 | 61 | $createForm($contactRequest), |
62 | 62 | $request, |
63 | - function () use ($request, $contactRequest, $translator, $emailService, $createContactRequest, $createForm) { |
|
63 | + function() use ($request, $contactRequest, $translator, $emailService, $createContactRequest, $createForm) { |
|
64 | 64 | $userRepo = $this->getDoctrine()->getRepository(FrontendUser::class); |
65 | 65 | $admins = $userRepo->findBy(['isAdministrator' => true, 'receivesAdministratorMail' => true]); |
66 | 66 | foreach ($admins as $admin) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $myForm = $this->handleCreateForm( |
78 | 78 | $request, |
79 | 79 | $user, |
80 | - function () use ($user, $translator) { |
|
80 | + function() use ($user, $translator) { |
|
81 | 81 | //ensure email is not taken already |
82 | 82 | if (!$this->emailNotUsed($user, $translator)) { |
83 | 83 | return false; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $myForm = $this->handleUpdateForm( |
113 | 113 | $request, |
114 | 114 | $frontendUser, |
115 | - function () use ($frontendUser, $translator, $beforeEmail) { |
|
115 | + function() use ($frontendUser, $translator, $beforeEmail) { |
|
116 | 116 | //prevent to disable login like this |
117 | 117 | if ($frontendUser === $this->getUser() && !$frontendUser->canLogin()) { |
118 | 118 | $this->displayError($translator->trans('update.error.can_not_disable_login_self', [], 'administration_frontend_user')); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $form = $this->handleDeleteForm( |
157 | 157 | $request, |
158 | 158 | $frontendUser, |
159 | - function () use ($frontendUser, $canDelete, &$formSubmitted, $translator) { |
|
159 | + function() use ($frontendUser, $canDelete, &$formSubmitted, $translator) { |
|
160 | 160 | if ($frontendUser === $this->getUser()) { |
161 | 161 | $this->displayError($translator->trans('delete.error.can_not_remove_self', [], 'administration_frontend_user')); |
162 | 162 | } else { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ); |
48 | 48 | |
49 | 49 | $admins = $this->processSelectFrontendUsers($request, $factory, $translator, 'admins', |
50 | - function ($doctor, $value) { |
|
50 | + function($doctor, $value) { |
|
51 | 51 | /* @var FrontendUser $doctor */ |
52 | 52 | $doctor->setIsAdministrator($value); |
53 | 53 | }, |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | //allow to edit who receives the emails |
58 | 58 | $emails = $this->processSelectFrontendUsers($request, $factory, $translator, 'emails', |
59 | - function ($doctor, $value) { |
|
59 | + function($doctor, $value) { |
|
60 | 60 | /* @var FrontendUser $doctor */ |
61 | 61 | $doctor->setReceivesAdministratorMail($value); |
62 | 62 | }, |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | //form creation |
87 | - $createForm = function () use ($factory, $name, $type, $selectCondition) { |
|
87 | + $createForm = function() use ($factory, $name, $type, $selectCondition) { |
|
88 | 88 | $frontendUsers = $this->getDoctrine()->getRepository(FrontendUser::class)->findBy($selectCondition); |
89 | 89 | |
90 | 90 | return $factory->createNamedBuilder($name) |
91 | 91 | ->setMapped(false) |
92 | - ->add('frontendUsers', EntityType::class, ['multiple' => true, 'query_builder' => function (EntityRepository $er) use ($type) { |
|
92 | + ->add('frontendUsers', EntityType::class, ['multiple' => true, 'query_builder' => function(EntityRepository $er) use ($type) { |
|
93 | 93 | $qb = $er->createQueryBuilder('e'); |
94 | 94 | if ($type === 'emails') { |
95 | 95 | $qb->where('e.isAdministrator = :isAdministrator'); |