Pluralize/Pluralize.php
protected function restoreWordCase($token)
	{
		if ($token === strtoupper($token)) {
			return function ($word) {
				return strtoupper($word);
			};
		}

		if ($token === ucfirst($token)) {
			return function ($word) {
				return ucfirst($word);
			};
		}

		return function ($word) {
			return $word;
		};
	}
protected function restoreWordCase($token)
	{
		if ($token === strtoupper($token)) {
			return function ($word) {
				return strtoupper($word);
			};
		}

		if ($token === ucfirst($token)) {
			return function ($word) {
				return ucfirst($word);
			};
		}

		return function ($word) {
			return $word;
		};
	}
Detect current casing, and restore automagicaly later through a callable;

@param $token string

@return \Callable