original_string: protected function createInstallOneOfRule(array $packages, $reason, $job)
      {
          $literals = array();
          foreach ($packages as $package) {
              $literals[] = $package->id;
          }
  
          return new Rule($literals, $reason, $job['packageName'], $job);
      }
code: protected function createInstallOneOfRule(array $packages, $reason, $job)
      {
          $literals = array();
          foreach ($packages as $package) {
              $literals[] = $package->id;
          }
  
          return new Rule($literals, $reason, $job['packageName'], $job);
      }
code_tokens: protected function createInstallOneOfRule ( array $ packages , $ reason , $ job ) { $ literals = array ( ) ; foreach ( $ packages as $ package ) { $ literals [ ] = $ package -> id ; } return new Rule ( $ literals , $ reason , $ job [ 'packageName' ] , $ job ) ; }
docstring: Creates a rule to install at least one of a set of packages
  
  The rule is (A|B|C) with A, B and C different packages. If the given
  set of packages is empty an impossible rule is generated.
  
  @param  array $packages The set of packages to choose from
  @param  int   $reason   A RULE_* constant describing the reason for
  generating this rule
  @param  array $job      The job this rule was created from
  @return Rule  The generated rule
docstring_tokens: Creates a rule to install at least one of a set of packages