4444use function ucfirst ;
4545use function view ;
4646
47+ use const PHP_INT_SIZE ;
48+
4749class PedigreeMapModule extends AbstractModule implements ModuleChartInterface, RequestHandlerInterface
4850{
4951 use ModuleChartTrait;
@@ -58,7 +60,7 @@ class PedigreeMapModule extends AbstractModule implements ModuleChartInterface,
5860
5961 // Limits
6062 public const int MINIMUM_GENERATIONS = 1 ;
61- public const int MAXIMUM_GENERATIONS = 10 ;
63+ public const int MAXIMUM_GENERATIONS = PHP_INT_SIZE === 4 ? 31 : 63 ;
6264
6365 // CSS colors for each generation
6466 protected const int COUNT_CSS_COLORS = 12 ;
@@ -192,14 +194,15 @@ public function handle(ServerRequestInterface $request): ResponseInterface
192194 ]);
193195
194196 return $ this ->viewResponse ('modules/pedigree-map/page ' , [
195- 'module ' => $ this ->name (),
197+ 'module ' => $ this ->name (),
196198 /* I18N: %s is an individual’s name */
197- 'title ' => I18N ::translate ('Pedigree map of %s ' , $ individual ->fullName ()),
198- 'tree ' => $ tree ,
199- 'individual ' => $ individual ,
200- 'generations ' => $ generations ,
201- 'maxgenerations ' => self ::MAXIMUM_GENERATIONS ,
202- 'map ' => $ map ,
199+ 'title ' => I18N ::translate ('Pedigree map of %s ' , $ individual ->fullName ()),
200+ 'tree ' => $ tree ,
201+ 'individual ' => $ individual ,
202+ 'generations ' => $ generations ,
203+ 'minimum_generations ' => self ::MINIMUM_GENERATIONS ,
204+ 'maximum_generations ' => self ::MAXIMUM_GENERATIONS ,
205+ 'map ' => $ map ,
203206 ]);
204207 }
205208
0 commit comments