original_string: protected function validate()
      {
          $this->data = $this->module->getInfo($this->module_id);
  
          if (empty($this->data)) {
              $this->error = $this->translation->text('Failed to read module @id', array('@id' => $this->module_id));
              return false;
          }
  
          try {
              $this->module_model->checkCore($this->data);
              $this->module_model->checkPhpVersion($this->data);
              return true;
          } catch (Exception $ex) {
              $this->error = $ex->getMessage();
              return false;
          }
      }
code: protected function validate()
      {
          $this->data = $this->module->getInfo($this->module_id);
  
          if (empty($this->data)) {
              $this->error = $this->translation->text('Failed to read module @id', array('@id' => $this->module_id));
              return false;
          }
  
          try {
              $this->module_model->checkCore($this->data);
              $this->module_model->checkPhpVersion($this->data);
              return true;
          } catch (Exception $ex) {
              $this->error = $ex->getMessage();
              return false;
          }
      }
code_tokens: protected function validate ( ) { $ this -> data = $ this -> module -> getInfo ( $ this -> module_id ) ; if ( empty ( $ this -> data ) ) { $ this -> error = $ this -> translation -> text ( 'Failed to read module @id' , array ( '@id' => $ this -> module_id ) ) ; return false ; } try { $ this -> module_model -> checkCore ( $ this -> data ) ; $ this -> module_model -> checkPhpVersion ( $ this -> data ) ; return true ; } catch ( Exception $ ex ) { $ this -> error = $ ex -> getMessage ( ) ; return false ; } }
docstring: Validates a module data
  @return boolean
docstring_tokens: Validates a module data