original_string: public function exportToArray()
      {
          $data = $this->toArray();
  
          if (count($this->exportable) === 0) {
              return $data;
          }
  
          $exportData = [];
          foreach ($data as $key => $value) {
              if (in_array($key, $this->exportable)) {
                  $exportData[$key] = $data[$key];
              }
          }
          return $exportData;
      }
code: public function exportToArray()
      {
          $data = $this->toArray();
  
          if (count($this->exportable) === 0) {
              return $data;
          }
  
          $exportData = [];
          foreach ($data as $key => $value) {
              if (in_array($key, $this->exportable)) {
                  $exportData[$key] = $data[$key];
              }
          }
          return $exportData;
      }
code_tokens: public function exportToArray ( ) { $ data = $ this -> toArray ( ) ; if ( count ( $ this -> exportable ) === 0 ) { return $ data ; } $ exportData = [ ] ; foreach ( $ data as $ key => $ value ) { if ( in_array ( $ key , $ this -> exportable ) ) { $ exportData [ $ key ] = $ data [ $ key ] ; } } return $ exportData ; }
docstring: Export to array, which will exclude unexportable keys
  
  @return array
docstring_tokens: Export to array which will exclude unexportable keys