original_string: protected function _addTransformers(Model $model, Transit $transit, array $attachment) {
          if (empty($attachment['transforms'])) {
              return;
          }
  
          foreach ($attachment['transforms'] as $options) {
              $transformer = $this->_getTransformer($attachment, $options);
  
              if ($options['self']) {
                  $transit->addSelfTransformer($transformer);
              } else {
                  $transit->addTransformer($transformer);
              }
          }
      }
code: protected function _addTransformers(Model $model, Transit $transit, array $attachment) {
          if (empty($attachment['transforms'])) {
              return;
          }
  
          foreach ($attachment['transforms'] as $options) {
              $transformer = $this->_getTransformer($attachment, $options);
  
              if ($options['self']) {
                  $transit->addSelfTransformer($transformer);
              } else {
                  $transit->addTransformer($transformer);
              }
          }
      }
code_tokens: protected function _addTransformers ( Model $ model , Transit $ transit , array $ attachment ) { if ( empty ( $ attachment [ 'transforms' ] ) ) { return ; } foreach ( $ attachment [ 'transforms' ] as $ options ) { $ transformer = $ this -> _getTransformer ( $ attachment , $ options ) ; if ( $ options [ 'self' ] ) { $ transit -> addSelfTransformer ( $ transformer ) ; } else { $ transit -> addTransformer ( $ transformer ) ; } } }
docstring: Add Transit Transformers based on the attachment settings.
  
  @param Model $model
  @param \Transit\Transit $transit
  @param array $attachment
docstring_tokens: Add Transit Transformers based on the attachment settings .