original_string: private function addArtifactToUsedGenerators($allGenerators, $feature, $func) {
          $artifact = $this->productLine->getArtifact($feature);
          foreach ($artifact->getGenerators() as $key => $cfg) {
              if (!array_key_exists($key, $allGenerators))
                  throw new ProductException("\"$key\" is not a valid generator");
              call_user_func(array($allGenerators[$key], $func), $artifact);
          }
      }
code: private function addArtifactToUsedGenerators($allGenerators, $feature, $func) {
          $artifact = $this->productLine->getArtifact($feature);
          foreach ($artifact->getGenerators() as $key => $cfg) {
              if (!array_key_exists($key, $allGenerators))
                  throw new ProductException("\"$key\" is not a valid generator");
              call_user_func(array($allGenerators[$key], $func), $artifact);
          }
      }
code_tokens: private function addArtifactToUsedGenerators ( $ allGenerators , $ feature , $ func ) { $ artifact = $ this -> productLine -> getArtifact ( $ feature ) ; foreach ( $ artifact -> getGenerators ( ) as $ key => $ cfg ) { if ( ! array_key_exists ( $ key , $ allGenerators ) ) throw new ProductException ( "\"$key\" is not a valid generator" ) ; call_user_func ( array ( $ allGenerators [ $ key ] , $ func ) , $ artifact ) ; } }
docstring: Adds a feature's artifact to all generators it specifies.
  This is done independently from whether the corresponding feature is
  selected or deselected to support generating code for both cases.
  @param \FeaturePhp\Generator\Generator[] $allGenerators
  @param \FeaturePhp\Model\Feature $feature
  @param callable $func whether to add a selected or deselected artifact
docstring_tokens: Adds a feature s artifact to all generators it specifies . This is done independently from whether the corresponding feature is selected or deselected to support generating code for both cases .