public static function getActivity(int $id): Activity
    {
        self::initializeActivities();

        if (!isset(self::$activities[$id])) {
            throw new RuneScapeException(sprintf("Activity with id %d does not exist.", $id));
        }

        return self::$activities[$id];
    }
public static function getActivity(int $id): Activity
    {
        self::initializeActivities();

        if (!isset(self::$activities[$id])) {
            throw new RuneScapeException(sprintf("Activity with id %d does not exist.", $id));
        }

        return self::$activities[$id];
    }
public static function getActivity ( int $ id ) : Activity { self :: initializeActivities ( ) ; if ( ! isset ( self :: $ activities [ $ id ] ) ) { throw new RuneScapeException ( sprintf ( "Activity with id %d does not exist." , $ id ) ) ; } return self :: $ activities [ $ id ] ; }
Retrieve an activity by ID.
You can use the ACTIVITY_ constants in this class for IDs.

@param int $id
@return Activity
@throws RuneScapeException When the requested activity does not exist.
Retrieve an activity by ID . You can use the ACTIVITY_ constants in this class for IDs .