code: 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;
  		};
  	}
docs: Detect current casing, and restore automagicaly later through a callable;
  
  @param $token string
  
  @return \Callable