original_string: 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('');
          }
      }
code: 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('');
          }
      }
code_tokens: 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 ( '' ) ; } }
docstring: Validates the TOML syntax of all config files.
  
  ## EXAMPLES
  
  # Validate the TOML syntax of the config files
  $ wp preflight config validate
docstring_tokens: Validates the TOML syntax of all config files .