original_string: private function getLabelVariations($originalLabel)
      {
          static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles');
  
          $originalLabel = trim($originalLabel);
  
          $isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR;
          if ($isTerminal) {
              $originalLabel = substr($originalLabel, 1);
          }
  
          $variations = array();
          $label = trim(urldecode($originalLabel));
  
          $sanitizedLabel = Common::sanitizeInputValue($label);
          $variations[] = $sanitizedLabel;
  
          if ($this->apiModule == 'Actions'
              && in_array($this->apiMethod, $pageTitleReports)
          ) {
              if ($isTerminal) {
                  array_unshift($variations, ' ' . $sanitizedLabel);
                  array_unshift($variations, ' ' . $label);
              } else {
                  // special case: the Actions.getPageTitles report prefixes some labels with a blank.
                  // the blank might be passed by the user but is removed in Request::getRequestArrayFromString.
                  $variations[] = ' ' . $sanitizedLabel;
                  $variations[] = ' ' . $label;
              }
          }
          $variations[] = $label;
  
          $variations = array_unique($variations);
  
          return $variations;
      }
code: private function getLabelVariations($originalLabel)
      {
          static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles');
  
          $originalLabel = trim($originalLabel);
  
          $isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR;
          if ($isTerminal) {
              $originalLabel = substr($originalLabel, 1);
          }
  
          $variations = array();
          $label = trim(urldecode($originalLabel));
  
          $sanitizedLabel = Common::sanitizeInputValue($label);
          $variations[] = $sanitizedLabel;
  
          if ($this->apiModule == 'Actions'
              && in_array($this->apiMethod, $pageTitleReports)
          ) {
              if ($isTerminal) {
                  array_unshift($variations, ' ' . $sanitizedLabel);
                  array_unshift($variations, ' ' . $label);
              } else {
                  // special case: the Actions.getPageTitles report prefixes some labels with a blank.
                  // the blank might be passed by the user but is removed in Request::getRequestArrayFromString.
                  $variations[] = ' ' . $sanitizedLabel;
                  $variations[] = ' ' . $label;
              }
          }
          $variations[] = $label;
  
          $variations = array_unique($variations);
  
          return $variations;
      }
code_tokens: private function getLabelVariations ( $ originalLabel ) { static $ pageTitleReports = array ( 'getPageTitles' , 'getEntryPageTitles' , 'getExitPageTitles' ) ; $ originalLabel = trim ( $ originalLabel ) ; $ isTerminal = substr ( $ originalLabel , 0 , 1 ) == self :: TERMINAL_OPERATOR ; if ( $ isTerminal ) { $ originalLabel = substr ( $ originalLabel , 1 ) ; } $ variations = array ( ) ; $ label = trim ( urldecode ( $ originalLabel ) ) ; $ sanitizedLabel = Common :: sanitizeInputValue ( $ label ) ; $ variations [ ] = $ sanitizedLabel ; if ( $ this -> apiModule == 'Actions' && in_array ( $ this -> apiMethod , $ pageTitleReports ) ) { if ( $ isTerminal ) { array_unshift ( $ variations , ' ' . $ sanitizedLabel ) ; array_unshift ( $ variations , ' ' . $ label ) ; } else { // special case: the Actions.getPageTitles report prefixes some labels with a blank. // the blank might be passed by the user but is removed in Request::getRequestArrayFromString. $ variations [ ] = ' ' . $ sanitizedLabel ; $ variations [ ] = ' ' . $ label ; } } $ variations [ ] = $ label ; $ variations = array_unique ( $ variations ) ; return $ variations ; }
docstring: Use variations of the label to make it easier to specify the desired label
  
  Note: The HTML Encoded version must be tried first, since in ResponseBuilder the $label is unsanitized
  via Common::unsanitizeLabelParameter.
  
  @param string $originalLabel
  @return array
docstring_tokens: Use variations of the label to make it easier to specify the desired label