public function validate(): void
    {
        $paths = $this->getConfigPaths();

        foreach ($paths as $path) {
            WP_CLI::line(
                WP_CLI::colorize("%B====> Validating $path%n")
            );

            try {
                Toml::parseFile($path);
                WP_CLI::success("File '$path' is valid.");
            } catch (ParseException $parseException) {
                WP_CLI::error_multi_line([
                    $parseException->getMessage(),
                ]);

                WP_CLI::warning("File '$path' will be ignored.");
            }

            // Print a empty line for better UX.
            WP_CLI::line('');
        }
    }