original_string: public function createContext(Registry $registry)
      {
          // List of schemas can evolve, but we don't want to generate new schema dynamically added, so we "clone" the array
          // to have a fixed list of schemas
          $schemas = array_values($registry->getSchemas());
  
          /** @var Schema $schema */
          foreach ($schemas as $schema) {
              $jsonSchema = $this->serializer->deserialize(file_get_contents($schema->getOrigin()), 'Joli\Jane\Model\JsonSchema', 'json', [
                  'document-origin' => $schema->getOrigin()
              ]);
  
              $this->chainGuesser->guessClass($jsonSchema, $schema->getRootName(), $schema->getOrigin() . '#', $registry);
          }
  
          foreach ($registry->getSchemas() as $schema) {
              foreach ($schema->getClasses() as $class) {
                  $properties = $this->chainGuesser->guessProperties($class->getObject(), $schema->getRootName(), $class->getReference(), $registry);
  
                  foreach ($properties as $property) {
                      $property->setType($this->chainGuesser->guessType($property->getObject(), $property->getName(), $property->getReference(), $registry));
                  }
  
                  $class->setProperties($properties);
              }
          }
  
  
          return new Context($registry);
      }
code: public function createContext(Registry $registry)
      {
          // List of schemas can evolve, but we don't want to generate new schema dynamically added, so we "clone" the array
          // to have a fixed list of schemas
          $schemas = array_values($registry->getSchemas());
  
          /** @var Schema $schema */
          foreach ($schemas as $schema) {
              $jsonSchema = $this->serializer->deserialize(file_get_contents($schema->getOrigin()), 'Joli\Jane\Model\JsonSchema', 'json', [
                  'document-origin' => $schema->getOrigin()
              ]);
  
              $this->chainGuesser->guessClass($jsonSchema, $schema->getRootName(), $schema->getOrigin() . '#', $registry);
          }
  
          foreach ($registry->getSchemas() as $schema) {
              foreach ($schema->getClasses() as $class) {
                  $properties = $this->chainGuesser->guessProperties($class->getObject(), $schema->getRootName(), $class->getReference(), $registry);
  
                  foreach ($properties as $property) {
                      $property->setType($this->chainGuesser->guessType($property->getObject(), $property->getName(), $property->getReference(), $registry));
                  }
  
                  $class->setProperties($properties);
              }
          }
  
  
          return new Context($registry);
      }
code_tokens: public function createContext ( Registry $ registry ) { // List of schemas can evolve, but we don't want to generate new schema dynamically added, so we "clone" the array // to have a fixed list of schemas $ schemas = array_values ( $ registry -> getSchemas ( ) ) ; /** @var Schema $schema */ foreach ( $ schemas as $ schema ) { $ jsonSchema = $ this -> serializer -> deserialize ( file_get_contents ( $ schema -> getOrigin ( ) ) , 'Joli\Jane\Model\JsonSchema' , 'json' , [ 'document-origin' => $ schema -> getOrigin ( ) ] ) ; $ this -> chainGuesser -> guessClass ( $ jsonSchema , $ schema -> getRootName ( ) , $ schema -> getOrigin ( ) . '#' , $ registry ) ; } foreach ( $ registry -> getSchemas ( ) as $ schema ) { foreach ( $ schema -> getClasses ( ) as $ class ) { $ properties = $ this -> chainGuesser -> guessProperties ( $ class -> getObject ( ) , $ schema -> getRootName ( ) , $ class -> getReference ( ) , $ registry ) ; foreach ( $ properties as $ property ) { $ property -> setType ( $ this -> chainGuesser -> guessType ( $ property -> getObject ( ) , $ property -> getName ( ) , $ property -> getReference ( ) , $ registry ) ) ; } $ class -> setProperties ( $ properties ) ; } } return new Context ( $ registry ) ; }
docstring: Return a list of class guessed.
  
  @param $registry
  
  @return Context
docstring_tokens: Return a list of class guessed .