@param string             $type
@param RuleInterface|null $next

@return RuleInterface
430922
public static function toOneRelationship(string $type, RuleInterface $next = null): RuleInterface
    {
        $primary = new ToOneRelationshipTypeCheckerRule($type);

        return $next === null ? $primary : new AndOperator($primary, $next);
    }
168718
protected static function isNumeric(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsNumeric() : new AndOperator(new AsNumeric(), $next);
    }
1359232
public function moveToNext($type, callable $callback = NULL)
	{
		$delim = (array)$type;

		while($this->valid())
		{
			$token = $this->current();

			if($token->isOneOf($delim))
			{
				return $token;
			}

			if($callback !== NULL)
			{
				$callback($token);
			}

			$this->next();
		}
	}
726924
public function type($type = null)
    {
        if ($type !== null) {
            $this->type = $type;
            return $this;
        }
        return $this->type;
    }
571700
public static function create($type=null) {
	$type = self::check_type($type);
	
	self::destroy($type);
	self::start($type);
}
793226
public static function existAll(string $tableName, string $primaryName, RuleInterface $next = null): RuleInterface
    {
        $primary = new ExistInDbTableMultipleWithDoctrineRule($tableName, $primaryName);

        return $next === null ? $primary : new AndOperator($primary, $next);
    }
433611
public static function asSanitizedString(RuleInterface $next = null): RuleInterface
    {
        return self::isString(
            self::filter(FILTER_SANITIZE_FULL_SPECIAL_CHARS, null, ErrorCodes::INVALID_VALUE, $next)
        );
    }
827714
public function findSiblingBlock(EM\BlockInterface $block, $next = false)
    {
        if (null === $row = $block->getRow()) {
            return null;
        }

        return $this->findSibling($row->getBlocks(), $block, $next);
    }
1171439
protected static function isDateTime(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsDateTime() : new AndOperator(new AsDateTime(), $next);
    }
452673
protected static function inValues(array $scalars, RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new ScalarInValues($scalars) : new AndOperator(static::inValues($scalars), $next);
    }
1205420
public static function getStackByType($type)
    {
        foreach (self::getStacks() as $stack) {
            if ($stack->isType($type)) {
                return $stack;
            }
        }
        return new Stacks\NullStack();
    }
205766
public Annotation next(@NonNull AnnotationType type) {
      return document() == null ? Fragments.detachedEmptyAnnotation() : document().getAnnotationSet().next(this, type);
   }
969217
public function setup(string $type = "all"): AbstractEdge
    {
        $fields = function(): AbstractEdge
        {
            $this->fields = Loaders\FieldsLoader::fetchArray($this);
            return $this;
        };

        $notification = function(): AbstractEdge
        {
            $is_a_notification = function(string $class_name): bool
            {
                if(!class_exists($class_name))
                    return false;
                $reflector = new \ReflectionClass($class_name);
                return $reflector->isSubclassOf(AbstractNotification::class);
            };
            $notification_class = get_class($this)."Notification";
            if($is_a_notification($notification_class)) {
                $this->notification = new $notification_class($this);
            }
            return $this;
        };

        
        $all = function() use ($fields, $notification): AbstractEdge
        {
            $fields();    
            return $notification();
        };

        if($type!="type" && in_array($type, get_defined_vars()))
            return $$type();
    }
90890
public function rule(callable $rule, string ...$types): BuilderInterface
    {
        $this->resolver->rule($rule, ...$types);

        return $this;
    }
16365
public function nextval($type = null) {
		$result = $this->getByType('nextval');
		if (!empty($type)) {
			return $result[$type];
		}
		return $result;
	}
1071377
public static function typeAncestryForType(ResolvedFormTypeInterface $formType = null, array &$types)
    {
        if (!($formType instanceof ResolvedFormTypeInterface)) {
            return;
        }

        $types[] = $formType->getBlockPrefix();

        self::typeAncestryForType($formType->getParent(), $types);
    }
1266318
public static function manipulation(Array $rules, String $type = 'none') : String
    {
        $query = NULL;

        foreach( $rules as $key => $value )
        {
            if( is_numeric($key) )
            {
                if( ! empty($val = self::get($value)) )
                {
                    $query .= $value . '/' . $val . '/';
                }
            }
            else
            {
                $query .= $key . '/' . $value . '/';
            }
        }

        return self::_addFix($query, $type);
    }