original_string: public function traveler(
          $function,
          $methodAttributes = null,
          $data = null,
          $recursive = false
      ) {
          if (!$data) {
              $data =& $this->_DATA;
          }
  
          foreach ($data as $key => $value) {
              $isRecursive = is_array($value) && $recursive;
  
              if ($isRecursive) {
                  $data[$key] = $this->_recursiveTraveler($function, $methodAttributes, $value);
              } else {
                  $data[$key] = $this->_callUserFunction($function, $key, $value, $methodAttributes);
              }
          }
  
          return $data;
      }
code: public function traveler(
          $function,
          $methodAttributes = null,
          $data = null,
          $recursive = false
      ) {
          if (!$data) {
              $data =& $this->_DATA;
          }
  
          foreach ($data as $key => $value) {
              $isRecursive = is_array($value) && $recursive;
  
              if ($isRecursive) {
                  $data[$key] = $this->_recursiveTraveler($function, $methodAttributes, $value);
              } else {
                  $data[$key] = $this->_callUserFunction($function, $key, $value, $methodAttributes);
              }
          }
  
          return $data;
      }
code_tokens: public function traveler ( $ function , $ methodAttributes = null , $ data = null , $ recursive = false ) { if ( ! $ data ) { $ data = & $ this -> _DATA ; } foreach ( $ data as $ key => $ value ) { $ isRecursive = is_array ( $ value ) && $ recursive ; if ( $ isRecursive ) { $ data [ $ key ] = $ this -> _recursiveTraveler ( $ function , $ methodAttributes , $ value ) ; } else { $ data [ $ key ] = $ this -> _callUserFunction ( $ function , $ key , $ value , $ methodAttributes ) ; } } return $ data ; }
docstring: allow to use given method or function for all data inside of object
  
  @param array|string|\Closure $function
  @param mixed $methodAttributes
  @param mixed $data
  @param bool $recursive
  @return array|null
docstring_tokens: allow to use given method or function for all data inside of object