original_string: public function applyActions(array $actions, $source, $target)
      {
          $applied = 0;
          foreach ($actions as $action_id => $data) {
  
              $handler = $this->getActionHandler($action_id);
  
              if (empty($handler)) {
                  continue;
              }
  
              $result = $this->applyAction($source, $target, $handler, $data);
  
              if ($result === true) {
                  $applied++;
              }
          }
  
          return $applied;
      }
code: public function applyActions(array $actions, $source, $target)
      {
          $applied = 0;
          foreach ($actions as $action_id => $data) {
  
              $handler = $this->getActionHandler($action_id);
  
              if (empty($handler)) {
                  continue;
              }
  
              $result = $this->applyAction($source, $target, $handler, $data);
  
              if ($result === true) {
                  $applied++;
              }
          }
  
          return $applied;
      }
code_tokens: public function applyActions ( array $ actions , $ source , $ target ) { $ applied = 0 ; foreach ( $ actions as $ action_id => $ data ) { $ handler = $ this -> getActionHandler ( $ action_id ) ; if ( empty ( $ handler ) ) { continue ; } $ result = $ this -> applyAction ( $ source , $ target , $ handler , $ data ) ; if ( $ result === true ) { $ applied ++ ; } } return $ applied ; }
docstring: Apply an array of actions
  @param array $actions
  @param string $source
  @param string $target
  @return int
docstring_tokens: Apply an array of actions