<?php
declare(strict_types=1);
namespace App\Reference;
final class Reference
{
    public static function get(string $type,bool $includeArchived=false): array { return (new ReferenceService())->values($type,$includeArchived); }
    public static function find(string $type,string $code): ?array { foreach(self::get($type,true) as $value){if((string)$value['code']===$code)return $value;}return null; }
}
