Files
BloomPatched/build/scripts/TargetDescriptionFiles/Variant.php
2021-06-01 23:57:12 +01:00

28 lines
537 B
PHP

<?php
class Variant
{
public ?string $name = null;
public ?string $package = null;
public ?string $pinout = null;
public function validate(): array
{
$failures = [];
if (empty($this->name)) {
$failures[] = 'Name not found';
}
if ($this->name == "standard") {
$failures[] = 'Name set to "standard" - needs attention';
}
if (empty($this->package)) {
$failures[] = 'Package not found';
}
return $failures;
}
}