<?php
namespace nur\data\types\impl;

use nur\A;
use nur\data\types\AbstractSimpleType;

class PointType extends AbstractSimpleType {
  function getClass(): string {
    return Point::class;
  }

  protected function _verifix(&$value, array &$result = null): void {
    $orig = $value;
    if ($this->verifixNoParse($value, $result)) return;
    if ($this->verifixCheckClass($value, $orig, $result)) return;
    $args = A::with($value);
    $value = new Point(...$args);
    self::result_valid($result, $value, $orig);
  }
}
