original_string: protected function removeNotImportantRemainingActions()
      {
          // remove remaining 'move' actions
          if (!empty($this->actions[self::GROUP_ADD])) {
              foreach ($this->actions[self::GROUP_ADD] as $index => $action) {
                  if ($action[0] === self::MOVE) {
                      unset($this->actions[self::GROUP_ADD][$index]);
                  }
              }
          }
          // remove remaining 'remove' actions if there are no any 'add' actions
          if (!empty($this->actions[self::GROUP_REMOVE]) && empty($this->actions[self::GROUP_ADD])) {
              unset($this->actions[self::GROUP_REMOVE]);
          }
      }
code: protected function removeNotImportantRemainingActions()
      {
          // remove remaining 'move' actions
          if (!empty($this->actions[self::GROUP_ADD])) {
              foreach ($this->actions[self::GROUP_ADD] as $index => $action) {
                  if ($action[0] === self::MOVE) {
                      unset($this->actions[self::GROUP_ADD][$index]);
                  }
              }
          }
          // remove remaining 'remove' actions if there are no any 'add' actions
          if (!empty($this->actions[self::GROUP_REMOVE]) && empty($this->actions[self::GROUP_ADD])) {
              unset($this->actions[self::GROUP_REMOVE]);
          }
      }
code_tokens: protected function removeNotImportantRemainingActions ( ) { // remove remaining 'move' actions if ( ! empty ( $ this -> actions [ self :: GROUP_ADD ] ) ) { foreach ( $ this -> actions [ self :: GROUP_ADD ] as $ index => $ action ) { if ( $ action [ 0 ] === self :: MOVE ) { unset ( $ this -> actions [ self :: GROUP_ADD ] [ $ index ] ) ; } } } // remove remaining 'remove' actions if there are no any 'add' actions if ( ! empty ( $ this -> actions [ self :: GROUP_REMOVE ] ) && empty ( $ this -> actions [ self :: GROUP_ADD ] ) ) { unset ( $ this -> actions [ self :: GROUP_REMOVE ] ) ; } }
docstring: Checks if there are any not executed actions and remove actions which are not important
docstring_tokens: Checks if there are any not executed actions and remove actions which are not important