<?php
namespace nur\sery\schema\types;

use nur\sery\schema\ValueException;

class tcallable implements IType {
  static function ensure_callable(&$callable): void {
    if (!is_callable($callable)) throw ValueException::invalid_value($callable);
  }

  static function ensure_ncallable(&$callable): void {
    if ($callable !== null) self::ensure_callable($callable);
  }
}
