Joli\Jane\Guesser\JsonSchema\ObjectGuesser::guessProperties PHP Method

guessProperties() public method

public guessProperties ( $object, $name, $classes )
    public function guessProperties($object, $name, $classes)
    {
        $properties = [];
        foreach ($object->getProperties() as $key => $property) {
            $propertyObj = $property;
            if ($propertyObj instanceof Reference) {
                $propertyObj = $this->resolver->resolve($propertyObj);
            }
            $type = $propertyObj->getType();
            $nullable = $type == 'null' || is_array($type) && in_array('null', $type);
            $properties[] = new Property($property, $key, $nullable);
        }
        return $properties;
    }