src/Leevel/Stack/LinkedList.php
public function validate($value): void
    {
        if (!$this->checkType($value)) {
            $e = sprintf('The linkedlist element type verification failed, and the allowed type is %s.',
                implode(',', $this->type)
            );

            throw new InvalidArgumentException($e);
        }
    }
public function validate($value): void
    {
        if (!$this->checkType($value)) {
            $e = sprintf('The linkedlist element type verification failed, and the allowed type is %s.',
                implode(',', $this->type)
            );

            throw new InvalidArgumentException($e);
        }
    }
验证类型是否正确遇到错误抛出异常.

@param mixed $value