original_string: public function createLifestream($serviceName, array $arguments = array(), array $filters = array(), array $formatters = array())
      {
          if (!array_key_exists($serviceName, $this->services)) {
              throw new \InvalidArgumentException(sprintf(
                  'Service "%s" not Found. Services supported: "%s"',
                   $serviceName,
                   implode('", "', $this->getSupportedServices())
              ));
          }
  
          $reflect = new \ReflectionClass($this->services[$serviceName]);
          $service = $reflect->newInstanceArgs($arguments);
          $service->setClient($this->client);
  
          $lifestream = new Lifestream($service, $filters, $formatters);
  
          return $lifestream;
      }
code: public function createLifestream($serviceName, array $arguments = array(), array $filters = array(), array $formatters = array())
      {
          if (!array_key_exists($serviceName, $this->services)) {
              throw new \InvalidArgumentException(sprintf(
                  'Service "%s" not Found. Services supported: "%s"',
                   $serviceName,
                   implode('", "', $this->getSupportedServices())
              ));
          }
  
          $reflect = new \ReflectionClass($this->services[$serviceName]);
          $service = $reflect->newInstanceArgs($arguments);
          $service->setClient($this->client);
  
          $lifestream = new Lifestream($service, $filters, $formatters);
  
          return $lifestream;
      }
code_tokens: public function createLifestream ( $ serviceName , array $ arguments = array ( ) , array $ filters = array ( ) , array $ formatters = array ( ) ) { if ( ! array_key_exists ( $ serviceName , $ this -> services ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Service "%s" not Found. Services supported: "%s"' , $ serviceName , implode ( '", "' , $ this -> getSupportedServices ( ) ) ) ) ; } $ reflect = new \ ReflectionClass ( $ this -> services [ $ serviceName ] ) ; $ service = $ reflect -> newInstanceArgs ( $ arguments ) ; $ service -> setClient ( $ this -> client ) ; $ lifestream = new Lifestream ( $ service , $ filters , $ formatters ) ; return $ lifestream ; }
docstring: Create a Lifestream with a nammed service
  
  @param string               $serviceName A service among LifestreamFactory::getSupportedServices
  @param string[]             $arguments   Arguments to give to service constructor
  @param FormatterInterface[] $filters     A collection of FormatterInterface
  @param FormatterInterface[] $formatters  A collection of FormatterInterface
  
  @return Lifestream A lifestream
docstring_tokens: Create a Lifestream with a nammed service