src/StringConverter/Types/Space.php
public function recipe(string $string, string $method, callable $callback = null): string
    {
        return preg_replace_callback(
            RegEx::REGEX_SPACE,
            [$this, $method],
            $this->callback($string, $callback)
        );
    }
public function recipe(string $string, string $method, callable $callback = null): string
    {
        return preg_replace_callback(
            RegEx::REGEX_SPACE,
            [$this, $method],
            $this->callback($string, $callback)
        );
    }
Conversion recipe.

@param  string $string
@param  string $method
@param  callable|null $callback
@return mixed