original_string: protected function setImage(array $data, $field_value_id = null)
      {
          if (!empty($data['images']) && !empty($field_value_id)) {
              $this->file->delete(array('entity' => 'field_value', 'entity_id' => $field_value_id));
          }
  
          return $this->setImages($data, $this->file, 'field_value');
      }
code: protected function setImage(array $data, $field_value_id = null)
      {
          if (!empty($data['images']) && !empty($field_value_id)) {
              $this->file->delete(array('entity' => 'field_value', 'entity_id' => $field_value_id));
          }
  
          return $this->setImages($data, $this->file, 'field_value');
      }
code_tokens: protected function setImage ( array $ data , $ field_value_id = null ) { if ( ! empty ( $ data [ 'images' ] ) && ! empty ( $ field_value_id ) ) { $ this -> file -> delete ( array ( 'entity' => 'field_value' , 'entity_id' => $ field_value_id ) ) ; } return $ this -> setImages ( $ data , $ this -> file , 'field_value' ) ; }
docstring: Sets a single image
  @param array $data
  @param null|int $field_value_id
  @return bool
docstring_tokens: Sets a single image