original_string: public function gitBranch($branch)
      {
          $options = ['options' => ['regexp' => '/^[a-zA-Z0-9\/\+\._-]+$/']];
          if (filter_var($branch, FILTER_VALIDATE_REGEXP, $options) === false) {
              throw new \InvalidArgumentException(sprintf("Invalid characters found in git branch name '%s'. Use only letters, numbers, underscore, hyphen and forward slashes.", $branch));
          }
  
          return $branch;
      }
code: public function gitBranch($branch)
      {
          $options = ['options' => ['regexp' => '/^[a-zA-Z0-9\/\+\._-]+$/']];
          if (filter_var($branch, FILTER_VALIDATE_REGEXP, $options) === false) {
              throw new \InvalidArgumentException(sprintf("Invalid characters found in git branch name '%s'. Use only letters, numbers, underscore, hyphen and forward slashes.", $branch));
          }
  
          return $branch;
      }
code_tokens: public function gitBranch ( $ branch ) { $ options = [ 'options' => [ 'regexp' => '/^[a-zA-Z0-9\/\+\._-]+$/' ] ] ; if ( filter_var ( $ branch , FILTER_VALIDATE_REGEXP , $ options ) === false ) { throw new \ InvalidArgumentException ( sprintf ( "Invalid characters found in git branch name '%s'. Use only letters, numbers, underscore, hyphen and forward slashes." , $ branch ) ) ; } return $ branch ; }
docstring: Validate git branch name.
  
  @param string $branch
  
  @return string
docstring_tokens: Validate git branch name .