@@ -86,11 +86,10 @@ |
||
| 86 | 86 | $max_gen_system = app(SosaRecordsService::class)->maxSystemGenerations(); |
| 87 | 87 | foreach ($users_root as $key => $user_root) { |
| 88 | 88 | $users_root[$key]['max_gen'] = is_numeric($user_root['max_gen']) ? |
| 89 | - (int) $user_root['max_gen'] : |
|
| 90 | - $max_gen_system; |
|
| 89 | + (int)$user_root['max_gen'] : $max_gen_system; |
|
| 91 | 90 | }; |
| 92 | 91 | |
| 93 | - return $this->viewResponse($this->module->name() . '::config-page', [ |
|
| 92 | + return $this->viewResponse($this->module->name().'::config-page', [ |
|
| 94 | 93 | 'module_name' => $this->module->name(), |
| 95 | 94 | 'title' => I18N::translate('Sosa Configuration'), |
| 96 | 95 | 'tree' => $tree, |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $user = $user_id === -1 ? new DefaultUser() : $this->user_service->find($user_id); |
| 59 | 59 | |
| 60 | 60 | /** @var SosaCalculatorService $sosa_calc_service */ |
| 61 | - $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, [ 'tree' => $tree, 'user' => $user]); |
|
| 61 | + $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, ['tree' => $tree, 'user' => $user]); |
|
| 62 | 62 | |
| 63 | 63 | if ( |
| 64 | 64 | $partial_from !== '' && |
@@ -70,8 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | return $res ? |
| 73 | - Registry::responseFactory()->response() : |
|
| 74 | - Registry::responseFactory()->response( |
|
| 73 | + Registry::responseFactory()->response() : Registry::responseFactory()->response( |
|
| 75 | 74 | I18N::translate('An error occurred while computing Sosa ancestors.'), |
| 76 | 75 | StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR |
| 77 | 76 | ); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $user = $user_id === -1 ? new DefaultUser() : $this->user_service->find($user_id); |
| 66 | 66 | if ($user !== null && ($root_indi = Registry::individualFactory()->make($root_id, $tree)) !== null) { |
| 67 | 67 | $tree->setUserPreference($user, 'MAJ_SOSA_ROOT_ID', $root_indi->xref()); |
| 68 | - $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', (string) $max_gen); |
|
| 68 | + $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', (string)$max_gen); |
|
| 69 | 69 | FlashMessages::addMessage(I18N::translate('The root individual has been updated.')); |
| 70 | 70 | return Registry::responseFactory()->redirect(SosaConfig::class, [ |
| 71 | 71 | 'tree' => $tree->name(), |