original_string: public function createService(ServiceLocatorInterface $serviceLocator)
      {
          $appConfig = $serviceLocator;
          $config = array_key_exists($appConfig['view_helper_date']) ? $appConfig['view_helper_date'] : array();
          if (array_key_exists('formats', $config)) {
              $this->addFormats($config['formats']);
          }
      }
code: public function createService(ServiceLocatorInterface $serviceLocator)
      {
          $appConfig = $serviceLocator;
          $config = array_key_exists($appConfig['view_helper_date']) ? $appConfig['view_helper_date'] : array();
          if (array_key_exists('formats', $config)) {
              $this->addFormats($config['formats']);
          }
      }
code_tokens: public function createService ( ServiceLocatorInterface $ serviceLocator ) { $ appConfig = $ serviceLocator ; $ config = array_key_exists ( $ appConfig [ 'view_helper_date' ] ) ? $ appConfig [ 'view_helper_date' ] : array ( ) ; if ( array_key_exists ( 'formats' , $ config ) ) { $ this -> addFormats ( $ config [ 'formats' ] ) ; } }
docstring: Create and configure instance
  
  @see \Zend\ServiceManager\FactoryInterface::createService()
  @param ServiceLocatorInterface $serviceLocator
docstring_tokens: Create and configure instance