app/Module/LifespansChartModule.php
protected function maxYear(array $individuals): int
    {
        $jd = array_reduce($individuals, static function ($carry, Individual $item) {
            return max($carry, $item->getEstimatedDeathDate()->maximumJulianDay());
        }, 0);

        $year = $this->jdToYear($jd);

        // Don't show future dates
        return min($year, (int) date('Y'));
    }
protected function maxYear(array $individuals): int
    {
        $jd = array_reduce($individuals, static function ($carry, Individual $item) {
            return max($carry, $item->getEstimatedDeathDate()->maximumJulianDay());
        }, 0);

        $year = $this->jdToYear($jd);

        // Don't show future dates
        return min($year, (int) date('Y'));
    }
protected function maxYear ( array $ individuals ) : int { $ jd = array_reduce ( $ individuals , static function ( $ carry , Individual $ item ) { return max ( $ carry , $ item -> getEstimatedDeathDate ( ) -> maximumJulianDay ( ) ) ; } , 0 ) ; $ year = $ this -> jdToYear ( $ jd ) ; // Don't show future dates return min ( $ year , ( int ) date ( 'Y' ) ) ; }
Find the latest event year for individuals

@param array $individuals

@return int
Find the latest event year for individuals