original_string: public function createView($object)
      {
          if (is_array($object)) {
              return array_map([ $this, 'createView' ], $object);
          }
  
          $view = $this->factory->createView($object);
  
          if (false === $view instanceof View) {
              return $this->notSuitableFactoryFor($object);
          }
  
          if ($view instanceof RootViewFactoryAware) {
              $view->setRootViewFactory($this);
          }
  
          return $view;
      }
code: public function createView($object)
      {
          if (is_array($object)) {
              return array_map([ $this, 'createView' ], $object);
          }
  
          $view = $this->factory->createView($object);
  
          if (false === $view instanceof View) {
              return $this->notSuitableFactoryFor($object);
          }
  
          if ($view instanceof RootViewFactoryAware) {
              $view->setRootViewFactory($this);
          }
  
          return $view;
      }
code_tokens: public function createView ( $ object ) { if ( is_array ( $ object ) ) { return array_map ( [ $ this , 'createView' ] , $ object ) ; } $ view = $ this -> factory -> createView ( $ object ) ; if ( false === $ view instanceof View ) { return $ this -> notSuitableFactoryFor ( $ object ) ; } if ( $ view instanceof RootViewFactoryAware ) { $ view -> setRootViewFactory ( $ this ) ; } return $ view ; }
docstring: Create a view for the object, allows arrays recursively
  
  @param $object
  
  @return View
  
  @throws Exception\UnsupportedObjectException
docstring_tokens: Create a view for the object allows arrays recursively