public static function hydrate(stdClass $comparison)
    {
        $hydrated = new ComparisonEntity();

        if (isset($comparison->id)) {
            $hydrated->setId($comparison->id);
        }

        if (isset($comparison->allowedMisses)) {
            $hydrated->setAllowedMisses($comparison->allowedMisses);
        }

        if (isset($comparison->filesThreshold)) {
            $hydrated->setFilesThreshold($comparison->filesThreshold);
        }

        if (isset($comparison->scannedOldFiles)) {
            $hydrated->setScannedOldFiles($comparison->scannedOldFiles);
        }

        if (isset($comparison->scannedNewFiles)) {
            $hydrated->setScannedNewFiles($comparison->scannedNewFiles);
        }

        if (isset($comparison->skippedOldFiles)) {
            $hydrated->setSkippedOldFiles($comparison->skippedOldFiles);
        }

        if (isset($comparison->skippedNewFiles)) {
            $hydrated->setSkippedNewFiles($comparison->skippedNewFiles);
        }

        if (isset($comparison->misses)) {
            $hydrated->setMisses($comparison->misses);
        }

        return $hydrated;
    }