PackageBoundaryResult
What one {@see PackageBoundaryRule} found. Violations and unresolved references are kept apart because they are different news. A violation says the boundary was crossed; an unresolved class says the check could not see — an uninstalled package, a stale autoloader, a typo. Merging them would let a rule that answered nothing read like a rule that found nothing, and those are opposite states.
PackageBoundaryResult::__construct()
public function __construct(string $label, array $violations, array $unresolved):Parameters
| Name | Type | Description |
|---|---|---|
| $label | string | |
| $violations | list<string> | references into a forbidden package, with the file that made them |
| $unresolved | list<string> | classes that could not be located, so ownership is unknown |
PackageBoundaryResult::ok()
public function ok(): boolClean only when the boundary held AND every reference could be checked. An unresolved reference fails the rule on purpose: a check that cannot see must not report success, or the first broken autoloader turns the gate green forever.