original_string: public function run($request)
      {
          $this->start();
          $registered = Config::inst()->get('DocumentationManifest', 'register_entities');
          foreach ($registered as $details) {
              // validate the details provided through the YAML configuration
              $required = array('Path', 'Title');
  
              // Check required configs
              foreach ($required as $require) {
                  if (!isset($details[$require])) {
                      $this->showError("$require is a required key in DocumentationManifest.register_entities");
                  }
              }
  
              // Check path is loaded
              $path = $this->getRealPath($details['Path']);
              if (!$path || !is_dir($path)) {
                  $this->showError($details['Path'] . ' is not a valid documentation directory');
              }
          }
          $this->end();
      }
code: public function run($request)
      {
          $this->start();
          $registered = Config::inst()->get('DocumentationManifest', 'register_entities');
          foreach ($registered as $details) {
              // validate the details provided through the YAML configuration
              $required = array('Path', 'Title');
  
              // Check required configs
              foreach ($required as $require) {
                  if (!isset($details[$require])) {
                      $this->showError("$require is a required key in DocumentationManifest.register_entities");
                  }
              }
  
              // Check path is loaded
              $path = $this->getRealPath($details['Path']);
              if (!$path || !is_dir($path)) {
                  $this->showError($details['Path'] . ' is not a valid documentation directory');
              }
          }
          $this->end();
      }
code_tokens: public function run ( $ request ) { $ this -> start ( ) ; $ registered = Config :: inst ( ) -> get ( 'DocumentationManifest' , 'register_entities' ) ; foreach ( $ registered as $ details ) { // validate the details provided through the YAML configuration $ required = array ( 'Path' , 'Title' ) ; // Check required configs foreach ( $ required as $ require ) { if ( ! isset ( $ details [ $ require ] ) ) { $ this -> showError ( "$require is a required key in DocumentationManifest.register_entities" ) ; } } // Check path is loaded $ path = $ this -> getRealPath ( $ details [ 'Path' ] ) ; if ( ! $ path || ! is_dir ( $ path ) ) { $ this -> showError ( $ details [ 'Path' ] . ' is not a valid documentation directory' ) ; } } $ this -> end ( ) ; }
docstring: Validate all source files
  
  @param  SS_HTTPRequest $request
  @throws Exception
docstring_tokens: Validate all source files