{"record":{"id":"1b2638aa8b5a24fc","repo":"nikic/PHP-Parser","slug":"expected-at-least-two-expressions","errorCode":null,"errorMessage":"Expected at least two expressions","messagePattern":"Expected at least two expressions","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"lib/PhpParser/BuilderFactory.php","lineNumber":351,"sourceCode":"     * @param string|Name|Expr $class Class name\n     * @param string|Identifier|Expr $name Constant name\n     */\n    public function classConstFetch($class, $name): Expr\\ClassConstFetch {\n        return new Expr\\ClassConstFetch(\n            BuilderHelpers::normalizeNameOrExpr($class),\n            BuilderHelpers::normalizeIdentifierOrExpr($name)\n        );\n    }\n\n    /**\n     * Creates nested Concat nodes from a list of expressions.\n     *\n     * @param Expr|string ...$exprs Expressions or literal strings\n     */\n    public function concat(...$exprs): Concat {\n        $numExprs = count($exprs);\n        if ($numExprs < 2) {\n            throw new \\LogicException('Expected at least two expressions');\n        }\n\n        $lastConcat = $this->normalizeStringExpr($exprs[0]);\n        for ($i = 1; $i < $numExprs; $i++) {\n            $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i]));\n        }\n        return $lastConcat;\n    }\n\n    /**\n     * @param string|Expr $expr\n     */\n    private function normalizeStringExpr($expr): Expr {\n        if ($expr instanceof Expr) {\n            return $expr;\n        }\n\n        if (\\is_string($expr)) {","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/nikic/PHP-Parser/blob/fbd47f7ebcbb450138d92642a0a53b72a5285dda/lib/PhpParser/BuilderFactory.php#L333-L369","documentation":"Error \"Expected at least two expressions\" thrown in nikic/PHP-Parser.","triggerScenarios":"Thrown at lib/PhpParser/BuilderFactory.php:351 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fbd47f7ebcbb450138d92642a0a53b72a5285dda","analyzedAt":"2026-08-17T03:58:32.123Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}