original_string: public function createCachedConditionGenerator($conditionGenerator, $ttl = null): ConditionGenerator
      {
          if (null === $this->cacheDriver) {
              return $conditionGenerator;
          }
  
          if ($conditionGenerator instanceof DqlConditionGenerator) {
              return new CachedDqlConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
          } elseif ($conditionGenerator instanceof NativeQueryConditionGenerator) {
              return new CachedNativeQueryConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
          }
  
          throw new \InvalidArgumentException(
              sprintf('ConditionGenerator "%s" is not supported by the DoctrineOrmFactory.', \get_class($conditionGenerator))
          );
      }
code: public function createCachedConditionGenerator($conditionGenerator, $ttl = null): ConditionGenerator
      {
          if (null === $this->cacheDriver) {
              return $conditionGenerator;
          }
  
          if ($conditionGenerator instanceof DqlConditionGenerator) {
              return new CachedDqlConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
          } elseif ($conditionGenerator instanceof NativeQueryConditionGenerator) {
              return new CachedNativeQueryConditionGenerator($conditionGenerator, $this->cacheDriver, $ttl);
          }
  
          throw new \InvalidArgumentException(
              sprintf('ConditionGenerator "%s" is not supported by the DoctrineOrmFactory.', \get_class($conditionGenerator))
          );
      }
code_tokens: public function createCachedConditionGenerator ( $ conditionGenerator , $ ttl = null ) : ConditionGenerator { if ( null === $ this -> cacheDriver ) { return $ conditionGenerator ; } if ( $ conditionGenerator instanceof DqlConditionGenerator ) { return new CachedDqlConditionGenerator ( $ conditionGenerator , $ this -> cacheDriver , $ ttl ) ; } elseif ( $ conditionGenerator instanceof NativeQueryConditionGenerator ) { return new CachedNativeQueryConditionGenerator ( $ conditionGenerator , $ this -> cacheDriver , $ ttl ) ; } throw new \ InvalidArgumentException ( sprintf ( 'ConditionGenerator "%s" is not supported by the DoctrineOrmFactory.' , \ get_class ( $ conditionGenerator ) ) ) ; }
docstring: Creates a new CachedConditionGenerator instance for the ConditionGenerator.
  
  @param DqlConditionGenerator|NativeQueryConditionGenerator $conditionGenerator
  @param int|\DateInterval|null                              $ttl                Optional. The TTL value of this item. If no value is sent and
  the driver supports TTL then the library may set a default value
  for it or let the driver take care of that.
docstring_tokens: Creates a new CachedConditionGenerator instance for the ConditionGenerator .