You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4022659
Browse filesBrowse the repository at this point in the historyBrowse files
Word the native NodeTraverser's LogicExceptions exactly like php-parser
The invalid-return messages named the returned type through
zend_zval_value_name() ("int", "float", "true", the class name) where
php-parser uses gettype() ("integer", "double", "boolean", "object"),
and the unreasonable-replacement messages left out the node types php-parser
interpolates ("Trying to replace statement (Stmt_Echo) with expression
(Expr_Variable)..."). Use zend_zval_get_legacy_type() and call getType()
on both nodes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Fdg8n3eEi4ZoXa4dA2k4A
? zend_strpprintf(0, "Trying to replace statement (%s) with expression (%s). Are you missing a Stmt_Expression wrapper?", Z_STRVAL_P(oldType.raw()), Z_STRVAL_P(newType.raw()))
818
+
: zend_strpprintf(0, "Trying to replace expression (%s) with statement (%s)", Z_STRVAL_P(oldType.raw()), Z_STRVAL_P(newType.raw()));
819
+
pt_trav_throw_logic(ZSTR_VAL(message));
820
+
zend_string_release(message);
821
+
returnfalse;
822
+
}
823
+
824
+
/* $node->getType() as a string; UNDEF means a pending exception */
$ntCompare("$ntHook replacing a statement with an expression", staticfunction (string$side, string$traverserClass) use ($smokeParser, $ntReturning, $ntHook): array {
$ntCompare("$ntHook replacing an expression with a statement", staticfunction (string$side, string$traverserClass) use ($smokeParser, $ntReturning, $ntHook): array {
$ntCompare("$ntHook replacing an expression with a statement in an array", staticfunction (string$side, string$traverserClass) use ($ntReturning, $ntHook): array {
0 commit comments