original_string: protected function resolveModel($data):Model
      {
          if ($data instanceof Model) {
              return $data;
          }
  
          $model = array_values($data)[0];
          if (! $model instanceof Model) {
              throw new InvalidArgumentException('You can only transform data containing Eloquent models.');
          }
  
          return $model;
      }
code: protected function resolveModel($data):Model
      {
          if ($data instanceof Model) {
              return $data;
          }
  
          $model = array_values($data)[0];
          if (! $model instanceof Model) {
              throw new InvalidArgumentException('You can only transform data containing Eloquent models.');
          }
  
          return $model;
      }
code_tokens: protected function resolveModel ( $ data ) : Model { if ( $ data instanceof Model ) { return $ data ; } $ model = array_values ( $ data ) [ 0 ] ; if ( ! $ model instanceof Model ) { throw new InvalidArgumentException ( 'You can only transform data containing Eloquent models.' ) ; } return $ model ; }
docstring: Resolve a model instance from the data.
  
  @param  \Illuminate\Database\Eloquent\Model|array $data
  @return \Illuminate\Database\Eloquent\Model
  @throws \InvalidArgumentException
docstring_tokens: Resolve a model instance from the data .