original_string: public function addNewImage(Input $image)
      {
          $data = [];
  
          $data['data'] = [
              'image' => $this->generateImageAddress($image->getImage(), $image->getImageMethod()),
          ];
  
          if ($image->getId()) {
              $data = $this->addImageId($data, $image->getId());
          }
  
          if ($image->getCrop()) {
              $data['data']['image'] = $this->addImageCrop($data['data']['image'], $image->getCrop());
          }
  
          if ($image->getConcepts()) {
              $data['data'] = $this->addImageConcepts($data['data'], $image->getConcepts());
          }
  
          if ($image->getMetaData()) {
              $data['data'] = $this->addImageMetadata($data['data'], $image->getMetaData());
          }
  
          return $data;
      }
code: public function addNewImage(Input $image)
      {
          $data = [];
  
          $data['data'] = [
              'image' => $this->generateImageAddress($image->getImage(), $image->getImageMethod()),
          ];
  
          if ($image->getId()) {
              $data = $this->addImageId($data, $image->getId());
          }
  
          if ($image->getCrop()) {
              $data['data']['image'] = $this->addImageCrop($data['data']['image'], $image->getCrop());
          }
  
          if ($image->getConcepts()) {
              $data['data'] = $this->addImageConcepts($data['data'], $image->getConcepts());
          }
  
          if ($image->getMetaData()) {
              $data['data'] = $this->addImageMetadata($data['data'], $image->getMetaData());
          }
  
          return $data;
      }
code_tokens: public function addNewImage ( Input $ image ) { $ data = [ ] ; $ data [ 'data' ] = [ 'image' => $ this -> generateImageAddress ( $ image -> getImage ( ) , $ image -> getImageMethod ( ) ) , ] ; if ( $ image -> getId ( ) ) { $ data = $ this -> addImageId ( $ data , $ image -> getId ( ) ) ; } if ( $ image -> getCrop ( ) ) { $ data [ 'data' ] [ 'image' ] = $ this -> addImageCrop ( $ data [ 'data' ] [ 'image' ] , $ image -> getCrop ( ) ) ; } if ( $ image -> getConcepts ( ) ) { $ data [ 'data' ] = $ this -> addImageConcepts ( $ data [ 'data' ] , $ image -> getConcepts ( ) ) ; } if ( $ image -> getMetaData ( ) ) { $ data [ 'data' ] = $ this -> addImageMetadata ( $ data [ 'data' ] , $ image -> getMetaData ( ) ) ; } return $ data ; }
docstring: Adds new Image to Custom Input
  
  @param Input $image
  
  @return array
docstring_tokens: Adds new Image to Custom Input