解析完整表达式
@param $next
@return null|string
355920
public function getPattern($next)
    {
        $this->maps = [];
        $pat_items = [];
        if ($next != null) {
            foreach ($next as $tagname => $option) {
                $pattern = $this->analysis($tagname, $option);
                if ($pattern !== null) {
                    $pat_items[] = $pattern;
                }
            }
        }
        if (!isset($this->maps[0]) || !isset($pat_items[0])) {
            return null;
        }
        $pattern = '@' . join('|', $pat_items) . '@';
        return $pattern;
    }
16365
public function nextval($type = null) {
		$result = $this->getByType('nextval');
		if (!empty($type)) {
			return $result[$type];
		}
		return $result;
	}
286852
public function handle($request, Closure $next)
    {
        if(null === $request->get('currency_code')  && null !== Session::get('currency_code')) {
            return $next($request);
        }
        $currencyCode = $request->get('currency_code');

        if(null === $currencyCode) {
            $configCurrency = $this->repository->getValueByKey('general_site_currency');
            $siteCurrencyModel = $this->curRep->find($configCurrency);
           
            $currencyCode = $siteCurrencyModel->code;
        } 
        Session::put('currency_code', $currencyCode);
       
        return $next($request);
    }
791649
public function inspect($variable = null, $next = null)
    {
        //argument 2 must be a string or null
        Argument::i()->test(2, 'string', 'null');

        //we are using tool in all cases
        $class = get_class($this);

        //if variable is null
        if (is_null($variable)) {
            //output the class
            Inspect::i()
                ->output(sprintf(Inspect::INSPECT, $class))
                ->output($this);

            return $this;
        }

        //if variable is true
        if ($variable === true) {
            //return whatever the next response is
            //or return the next specified variable
            return Inspect::i()->next($this, $next);
        }

        //if variable is not a string
        if (!is_string($variable)) {
            //output variable
            Inspect::i()
                ->output(sprintf(Inspect::INSPECT, 'Variable'))
                ->output($variable);

            return $this;
        }

        //if variable is set
        if (isset($this->$variable)) {
            //output it
            Inspect::i()
                ->output(sprintf(Inspect::INSPECT, $class.'->'.$variable))
                ->output($this->$variable);

            return $this;
        }

        //any other case output variable
        Inspect::i()
            ->output(sprintf(Inspect::INSPECT, 'Variable'))
            ->output($variable);

        return $this;
    }
889821
public function handle($request, Closure $next)
    {
        if (! $this->xray->isEnabled()) {
            return $next($request);
        }

        $this->xray->boot();

        /** @var \Illuminate\Http\Response $response */
        $response = $next($request);

        if ($response->isRedirection()) {
            return $response;
        } elseif (
            ($response->headers->has('Content-Type') &&
                strpos($response->headers->get('Content-Type'), 'html') === false)
            || $request->getRequestFormat() !== 'html'
            || $response->getContent() === false
        ) {
            return $response;
        } elseif (is_null($response->exception) && !is_null($this->xray->getBaseView())) {
            // Modify the response to add the Debugbar
            $this->injectXrayBar($response);
        }
        return $response;
    }
423119
public function nextNews()
    {
        $next = $this->newsManager()->next();

        if (!$next) {
            return null;
        }

        return $this->newsFormatNav($next);
    }
95532
public function handle($request, Closure $next)
    {
        return $next($request)
            ->header('Access-Control-Allow-Origin', '*')
            ->header('Access-Control-Allow-Methods', 'POST, OPTIONS, PUT, PATCH, DELETE')
            ->header('Access-Control-Allow-Credentials', 'true')
            ->header('Access-Control-Max-Age', '10000')
            ->header('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With');
    }
205436
function next()
    {
        if (isset($this->_limit) && $this->offset >= $this->_limit)
        {
            return null;
        }
    
        if (!isset($this->data) || ($this->pos >= sizeof($this->data) && $this->truncated))
        {
            $this->loadNextPage();
        }
        
        if ($this->pos < sizeof($this->data))
        {
            $item_data = $this->data[$this->pos];
            $this->pos++;        
            $this->offset++;            
            $cls = $this->item_cls;
            return new $cls($this->api, $item_data, true);
        }
        else
        {
            return null;
        }
    }
1194781
public function next()
    {
        $keys  = array_keys($this->items);
        $index = array_search($this->currentKey, $keys);

        $index++;

        $this->currentKey = array_key_exists($index, $keys) ? $keys[$index] : null;
    }
225981
public function getNext()
    {
        for (; $this->idx < $this->count; ++$this->idx) {
            if (($this->tokens[$this->idx]->type !== Token::TYPE_WHITESPACE)
                && ($this->tokens[$this->idx]->type !== Token::TYPE_COMMENT)
            ) {
                return $this->tokens[$this->idx++];
            }
        }

        return null;
    }
1027237
public function handle($request, Closure $next)
    {
        $locale = $this->localizer->detect();

        if ($locale) {
            $this->localizer->store($locale);
        }

        return $next($request);
    }
782829
public static function postId(RuleInterface $next = null): RuleInterface
    {
        return self::stringToInt(self::readable(postsApi::class, $next));
    }
1212363
public function next() {
    $this->position++;
    if ($this->position >= $this->length) {
      $this->position = $this->length;
      return NULL;
    }
    return $this->tokens[$this->position];
  }
649060
public function nextLine()
    {
        $value = $this->getConnection()->_get_channel_packet(SSH2::CHANNEL_EXEC);

        return $value === true ? null : $value;
    }
15881
protected static function isString(RuleInterface $next = null): RuleInterface
    {
        return $next === null ? new AsString() : new AndOperator(new AsString(), $next);
    }
50165
public function handle($request, Closure $next)
    {
        // 获取到微信请求里包含的几项内容
        $signature = $request->input('signature');
        $timestamp = $request->input('timestamp');
        $nonce = $request->input('nonce');

        // 公众号消息校验Token
        $token = Config::get('wechat.encodingToken');

        // 加工出自己的 signature
        $our_signature = array($token, $timestamp, $nonce);
        sort($our_signature, SORT_STRING);
        $our_signature = implode($our_signature);
        $our_signature = sha1($our_signature);

        // 用自己的 signature 去跟请求里的 signature 对比
        if ($our_signature !== $signature) {
            throw new AccessDeniedHttpException('Access Denied');
        }

        return $next($request);
    }
1177710
public function next()
    {
        if (count($this->data) > 0) {
            array_shift($this->data);
        }
        ++$this->position;

        if (count($this->data) == 0 && !is_null($this->resumptionToken)) {
            $this->fetchMore();
        }

        if (count($this->data) == 0) {
            return null;
        }
    }