0; } /** * Creates a describe block as `$describeDescription` → `$testDescription` format. * * @param array $describeDescriptions */ public static function describe(array $describeDescriptions, string $testDescription): string { $descriptionComponents = [...$describeDescriptions, $testDescription]; return sprintf(str_repeat('`%s` → ', count($describeDescriptions)).'%s', ...$descriptionComponents); } /** * Determine if a given value is a valid URL. */ public static function isUrl(string $value): bool { return (bool) filter_var($value, FILTER_VALIDATE_URL); } /** * Converts the given `$target` to a URL-friendly "slug". */ public static function slugify(string $target): string { $target = preg_replace('/[^a-zA-Z0-9]+/', '-', $target); return strtolower(trim((string) $target, '-')); } }