> $source Source array for possible extensions * @param DistributionType|int $distribution Distribution type for the extensions * * @return false|array * * @since 1.0.0 */ public static function generateExtension($source = null, $distribution = DistributionType::UNIFORM) { if ($source === null) { $source = self::$extensions; } switch ($distribution) { case DistributionType::UNIFORM: $key = \rand(0, \count($source) - 1); break; default: return false; } return $source[$key][0]; } }