<?php
declare(strict_types=1);
namespace App\Services\Pipeline\Steps;
use App\Services\Pipeline\AbstractPipelineStep; use App\Services\Trust\TrustEngineService;
final class TrustPipelineStep extends AbstractPipelineStep {
 public function code():string{return 'trust';} public function label():string{return 'Trust Engine';} public function order():int{return 20;}
 public function execute(array $c):array {$r=(new TrustEngineService())->evaluatePackageFile((string)$c['zip_path'],$c['package_id'],$c['user_id'],false);$d=(string)($r['decision']??'REJECTED');return $this->result($d,(int)($r['score']??0),'Trust Engine : '.$d.'.',(array)($r['issues']??[]),(array)($r['warnings']??[]),['report'=>$r],$d==='REJECTED');}
}
