original_string: protected function _execute()
      {
          $mapper = $this->_mapper;
          foreach ($this->_data as $key => $val) {
              $mapper($val, $key, $this);
          }
          $this->_data = null;
  
          if (!empty($this->_intermediate) && empty($this->_reducer)) {
              throw new LogicException('No reducer function was provided');
          }
  
          $reducer = $this->_reducer;
          foreach ($this->_intermediate as $key => $list) {
              $reducer($list, $key, $this);
          }
          $this->_intermediate = [];
          $this->_executed = true;
      }
code: protected function _execute()
      {
          $mapper = $this->_mapper;
          foreach ($this->_data as $key => $val) {
              $mapper($val, $key, $this);
          }
          $this->_data = null;
  
          if (!empty($this->_intermediate) && empty($this->_reducer)) {
              throw new LogicException('No reducer function was provided');
          }
  
          $reducer = $this->_reducer;
          foreach ($this->_intermediate as $key => $list) {
              $reducer($list, $key, $this);
          }
          $this->_intermediate = [];
          $this->_executed = true;
      }
code_tokens: protected function _execute ( ) { $ mapper = $ this -> _mapper ; foreach ( $ this -> _data as $ key => $ val ) { $ mapper ( $ val , $ key , $ this ) ; } $ this -> _data = null ; if ( ! empty ( $ this -> _intermediate ) && empty ( $ this -> _reducer ) ) { throw new LogicException ( 'No reducer function was provided' ) ; } $ reducer = $ this -> _reducer ; foreach ( $ this -> _intermediate as $ key => $ list ) { $ reducer ( $ list , $ key , $ this ) ; } $ this -> _intermediate = [ ] ; $ this -> _executed = true ; }
docstring: Runs the actual Map-Reduce algorithm. This is iterate the original data
  and call the mapper function for each , then for each intermediate
  bucket created during the Map phase call the reduce function.
  
  @return void
  @throws \LogicException if emitIntermediate was called but no reducer function
  was provided
docstring_tokens: Runs the actual Map - Reduce algorithm . This is iterate the original data and call the mapper function for each then for each intermediate bucket created during the Map phase call the reduce function .