original_string: public function simpleUpload($boxFile, $attributes, array $params = [])
      {
          //Make BoxMain File
          $boxFile = $this->makeBoxFile($boxFile);
  
          //Set the attributes and file
          $params['attributes'] = $attributes;
          $params['file'] = $boxFile;
  
          //Upload File
          $file = $this->postToContent('/files/content', $params);
          $body = $file->getDecodedBody();
          if ($body["type"] == "error")
              throw new Exceptions\BoxClientException($body["message"] . " - ID: " . $body["context_info"]["conflicts"]["id"], $body["status"]);
          //Make and Return the Model
          $fileData = array();
          if (!empty($body["total_count"]) && $body["total_count"])
              $fileData = $body["entries"][0];
          return new BoxFileMetadata($fileData);
      }
code: public function simpleUpload($boxFile, $attributes, array $params = [])
      {
          //Make BoxMain File
          $boxFile = $this->makeBoxFile($boxFile);
  
          //Set the attributes and file
          $params['attributes'] = $attributes;
          $params['file'] = $boxFile;
  
          //Upload File
          $file = $this->postToContent('/files/content', $params);
          $body = $file->getDecodedBody();
          if ($body["type"] == "error")
              throw new Exceptions\BoxClientException($body["message"] . " - ID: " . $body["context_info"]["conflicts"]["id"], $body["status"]);
          //Make and Return the Model
          $fileData = array();
          if (!empty($body["total_count"]) && $body["total_count"])
              $fileData = $body["entries"][0];
          return new BoxFileMetadata($fileData);
      }
code_tokens: public function simpleUpload ( $ boxFile , $ attributes , array $ params = [ ] ) { //Make BoxMain File $ boxFile = $ this -> makeBoxFile ( $ boxFile ) ; //Set the attributes and file $ params [ 'attributes' ] = $ attributes ; $ params [ 'file' ] = $ boxFile ; //Upload File $ file = $ this -> postToContent ( '/files/content' , $ params ) ; $ body = $ file -> getDecodedBody ( ) ; if ( $ body [ "type" ] == "error" ) throw new Exceptions \ BoxClientException ( $ body [ "message" ] . " - ID: " . $ body [ "context_info" ] [ "conflicts" ] [ "id" ] , $ body [ "status" ] ) ; //Make and Return the Model $ fileData = array ( ) ; if ( ! empty ( $ body [ "total_count" ] ) && $ body [ "total_count" ] ) $ fileData = $ body [ "entries" ] [ 0 ] ; return new BoxFileMetadata ( $ fileData ) ; }
docstring: Upload a File to BoxMain in a single request
  
  @param  string|BoxFile $boxFile BoxFile object or Path to file
  @param  array             $path        Path to upload the file to
  @param  array              $params      Additional Params
  
  @link https://www.box.com/developers/documentation/http/documentation#files-upload
  
  @return \Ziggeo\BoxContent\Content\BoxFileMetadata
docstring_tokens: Upload a File to BoxMain in a single request