src/Factory/ProjectFactory.php
public static function createFromAPIResponse(array $response): Project
    {
        $project = new Project();

        $renders = [];

        if (key_exists('renders', $response)) {
            $renders = RenderFactory::createFromAPIResponse($response['renders']);
        }

        $project
            ->setId($response['id'])
            ->setLabel($response['label'])
            ->setDescription($response['description'])
            ->setThumbnailPath($response['thumb'])
            ->setRenders($renders)
            ->setArchived($response['archived'])
            ->setPending($response['pending'])
            ->setCreatedAt(new \DateTimeImmutable($response['created_at']))
            ->setUpdatedAt(new \DateTimeImmutable($response['updated_at']))
            ->setCreatedBy((string) $response['created_by'])
        ;

        return $project;
    }
public static function createFromAPIResponse(array $response): Project
    {
        $project = new Project();

        $renders = [];

        if (key_exists('renders', $response)) {
            $renders = RenderFactory::createFromAPIResponse($response['renders']);
        }

        $project
            ->setId($response['id'])
            ->setLabel($response['label'])
            ->setDescription($response['description'])
            ->setThumbnailPath($response['thumb'])
            ->setRenders($renders)
            ->setArchived($response['archived'])
            ->setPending($response['pending'])
            ->setCreatedAt(new \DateTimeImmutable($response['created_at']))
            ->setUpdatedAt(new \DateTimeImmutable($response['updated_at']))
            ->setCreatedBy((string) $response['created_by'])
        ;

        return $project;
    }
@param array $response

@return Project