Aplicar Pint aos 18 ficheiros que falhavam lint:check

Só formatação. 16 já falhavam em fase5-producao; 2 vêm de c9bd6db.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 17:40:37 +02:00
co-authored by Claude Opus 5.5
parent 95f80a10d7
commit f590a29e55
18 changed files with 50 additions and 47 deletions
+3 -3
View File
@@ -128,9 +128,9 @@ if ($action === 'prepare') {
$budget = $db->table('cb_budgets')->first();
$decision = $db->table('ir_steps')->first();
$report = ['passed' => true, 'identity' => $identity, 'scope' => '1:1:1', 'added_grants' => $added, 'existing_grants_preserved' => true, 'existing_accounts_preserved' => true, 'single_approved_request' => true, 'single_reservation' => true, 'reservation' => $db->table('cb_budget_entries')->where('kind', 'reserve')->first(), 'budget' => $budget, 'decision' => $decision, 'pointer_preserved' => true, 'backup_sha256' => $baseline['backup_sha256'], 'recovery_directory' => $recovery, 'checked_at' => gmdate('c'), 'owner_runtime_limitation' => true, 'visual_review' => false, 'read_only_record_visibility_limitation' => true];
file_put_contents($root.'/docs/proofs/sgf-demo-8039-delivery.json',json_encode($report,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
file_put_contents($host.'/config/purchasing-access.php','<?php return ["initialisation_scopes"=>[]];');
echo json_encode($report,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
file_put_contents($root.'/docs/proofs/sgf-demo-8039-delivery.json', json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
file_put_contents($host.'/config/purchasing-access.php', '<?php return ["initialisation_scopes"=>[]];');
echo json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
} else {
throw new RuntimeException('Use prepare, install or verify');
}
+3 -3
View File
@@ -32,7 +32,7 @@ $fingerprints = function () use ($db) {
$hashes[$t->tablename] = hash('sha256', json_encode(array_column($rows, 'data'), JSON_THROW_ON_ERROR));
}
return $hashes;
return $hashes;
});
};
$action = $argv[1] ?? '';
@@ -97,11 +97,11 @@ if ($action === 'prepare') {
} elseif (in_array($action, ['apply', 'reapply'], true)) {
$plan = $deploy->plan($candidate['directory'], $candidate['archive']['manifest_sha256']);
$result = $deploy->apply($candidate['directory'], $candidate['archive']['manifest_sha256'], $plan['target_sha256'], 'Authorised read-only visibility correction 8039', true);
file_put_contents($recovery.'/'.($action === 'apply' ? 'applied' : 'reapplied').'.json',json_encode($result,JSON_PRETTY_PRINT));
file_put_contents($recovery.'/'.($action === 'apply' ? 'applied' : 'reapplied').'.json', json_encode($result, JSON_PRETTY_PRINT));
} else {
throw new RuntimeException('Use prepare/apply/rollback/reapply/verify');
}
unlink($host.'/storage/framework/down');
echo json_encode($result,JSON_PRETTY_PRINT);
echo json_encode($result, JSON_PRETTY_PRINT);
}
}
+2 -2
View File
@@ -38,5 +38,5 @@ foreach ([...array_keys($payload), 'manifest.json'] as $path) {
}
$zip->close();
$result = ['directory' => $dir, 'archive' => ['file' => $archive, 'sha256' => hash_file('sha256', $archive), 'manifest_sha256' => hash('sha256', $manifestText)], 'prior_manifest_sha256' => $prior['artifact']['archive']['manifest_sha256'], 'changed_files' => [$file], 'schema_changed' => false, 'rights_changed' => false, 'installed_real' => false];
file_put_contents($root.'/docs/proofs/sgf-read-candidate.json', json_encode($result,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($result,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
file_put_contents($root.'/docs/proofs/sgf-read-candidate.json', json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($result, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
+2 -2
View File
@@ -66,5 +66,5 @@ $check($ok['confirmed']['confirmed_by'] === 4 && $ok['confirmed']['proposal']['p
$deny(fn () => $step($ok, 1, 'quote', []), 409, 'Confirmed process cannot be rewritten');
$check($state['proposals'][0]['comparison']['fingerprint'] === $comparison['fingerprint'], 'Comparison snapshot and justification preserved');
$report = ['passed' => true, 'checks' => $checks, 'synthetic_only' => true, 'persistent_demo_accounts_created' => false, 'checked_at' => gmdate('c')];
file_put_contents(dirname(__DIR__).'/docs/proofs/sgf-sourcing-core.json',json_encode($report,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($report,JSON_PRETTY_PRINT);
file_put_contents(dirname(__DIR__).'/docs/proofs/sgf-sourcing-core.json', json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($report, JSON_PRETTY_PRINT);
+3 -3
View File
@@ -153,12 +153,12 @@ try {
throw new RuntimeException('Incomplete comparison must not be awarded');
}
$report = ['passed' => true, 'identity' => $identity, 'scope' => '1:1:1', 'candidate' => $candidate, 'protected_users_requisition_reservation_consumption_unchanged' => true, 'previous_grants_preserved' => true, 'new_grants' => $new, 'persistent_accounts_created' => false, 'proposals' => 0, 'confirmed' => false, 'suppliers_selected' => count($state['suppliers']), 'quotations' => count($state['quotes']), 'pending' => 'Second eligible evaluator and independent confirmer absent; no account created by owner decision.', 'backup_sha256' => $baseline['backup_sha256'], 'recovery_directory' => $recovery, 'checked_at' => gmdate('c')];
file_put_contents($root.'/docs/proofs/sgf-sourcing-demo.json',json_encode($report,JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($report,JSON_PRETTY_PRINT);
file_put_contents($root.'/docs/proofs/sgf-sourcing-demo.json', json_encode($report, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($report, JSON_PRETTY_PRINT);
} else {
throw new RuntimeException('Use prepare/apply/verify');
}
} catch (Throwable $e) {
fwrite(STDERR,$e->getMessage()."\n");
fwrite(STDERR, $e->getMessage()."\n");
exit(1);
}
+1 -1
View File
@@ -60,6 +60,6 @@ try {
file_put_contents($host.'/storage/app/private/module-deployments/schema-transition-'.$manifestHash.'.json', json_encode($receipt, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode($result + ['activated' => false, 'rights_granted' => false], JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR);
} catch (Throwable $e) {
fwrite(STDERR,$e->getMessage()."\n");
fwrite(STDERR, $e->getMessage()."\n");
exit(1);
}