original_string: protected function buildModel(array $data = array()){
          $Model = NULL;
          if (isset($this->model)){
              $Model = new $this->model();
              $Model->setBaseUrl($this->getBaseUrl());
              if ($this->getAuth() !== NULL) {
                  $Model->setAuth($this->getAuth());
              }
              if (!empty($data)){
                  foreach($data as $key => $value){
                      $Model->set($key,$value);
                  }
              }
          }
          return $Model;
      }
code: protected function buildModel(array $data = array()){
          $Model = NULL;
          if (isset($this->model)){
              $Model = new $this->model();
              $Model->setBaseUrl($this->getBaseUrl());
              if ($this->getAuth() !== NULL) {
                  $Model->setAuth($this->getAuth());
              }
              if (!empty($data)){
                  foreach($data as $key => $value){
                      $Model->set($key,$value);
                  }
              }
          }
          return $Model;
      }
code_tokens: protected function buildModel ( array $ data = array ( ) ) { $ Model = NULL ; if ( isset ( $ this -> model ) ) { $ Model = new $ this -> model ( ) ; $ Model -> setBaseUrl ( $ this -> getBaseUrl ( ) ) ; if ( $ this -> getAuth ( ) !== NULL ) { $ Model -> setAuth ( $ this -> getAuth ( ) ) ; } if ( ! empty ( $ data ) ) { foreach ( $ data as $ key => $ value ) { $ Model -> set ( $ key , $ value ) ; } } } return $ Model ; }
docstring: Build the ModelEndpoint
  @param array $data
  @return AbstractModelEndpoint
docstring_tokens: Build the ModelEndpoint