<?php

namespace WPD\Domain;

final class Finding
{
    private $data;

    public function __construct($id, $title, $certainty, $severity, $evidence, $explanation, array $solution, $verification, $coverage = 'completa')
    {
        $this->data = array(
            'id' => (string) $id,
            'title' => (string) $title,
            'certainty' => (string) $certainty,
            'severity' => (string) $severity,
            'evidence' => (string) $evidence,
            'explanation' => (string) $explanation,
            'solution' => array_values($solution),
            'verification' => (string) $verification,
            'coverage' => (string) $coverage,
        );
    }

    public function toArray()
    {
        return $this->data;
    }
}

