<?php
declare(strict_types=1);

namespace PpPhp\Core\Designer\Architecture;

final class DesignerRuntimeLock
{
    public function create(array $review): array
    {
        return [
            'lockId' => 'r0100_6n_1_designer_runtime_lock',
            'status' => ($review['ok'] ?? false) ? 'LOCKED' : 'FAILED',
            'score' => (int) ($review['summary']['score'] ?? 0),
            'lockedAt' => date('c'),
            'contracts' => array_keys((array) ($review['contracts'] ?? [])),
            'runtimeChain' => [
                'R0100.6B', 'R0100.6C', 'R0100.6D', 'R0100.6E', 'R0100.6F',
                'R0100.6G', 'R0100.6H', 'R0100.6I', 'R0100.6J', 'R0100.6K',
                'R0100.6L', 'R0100.6M', 'R0100.6N', 'R0100.6O',
            ],
        ];
    }
}
