Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/xhpast/undeclared-variables.lint-test
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | |||||
function catchy() { | function catchy() { | ||||
try { | try { | ||||
dangerous(); | dangerous(); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$y->z(); | $y->z(); | ||||
} | } | ||||
} | } | ||||
function some_func($x, $y) { | |||||
$func = function($z) use ($x) { | |||||
echo $x; | |||||
echo $y; | |||||
echo $z; | |||||
}; | |||||
} | |||||
~~~~~~~~~~ | ~~~~~~~~~~ | ||||
error:28:3 | error:28:3 | ||||
error:30:3 | error:30:3 | ||||
error:36:3 | error:36:3 | ||||
error:42:5 | error:42:5 | ||||
error:43:7 | error:43:7 | ||||
error:44:5 | error:44:5 | ||||
error:45:5 | error:45:5 | ||||
error:46:10 | error:46:10 | ||||
error:51:10 worst ever | error:51:10 worst ever | ||||
warning:61:3 | warning:61:3 | ||||
error:87:3 This stuff is basically testing the lexer/parser for function decls. | error:87:3 This stuff is basically testing the lexer/parser for function decls. | ||||
error:104:15 Variables in instance derefs should be checked, static should not. | error:104:15 Variables in instance derefs should be checked, static should not. | ||||
error:118:3 isset() and empty() should not trigger errors. | error:118:3 isset() and empty() should not trigger errors. | ||||
error:122:3 Should only warn once in this function. | error:122:3 Should only warn once in this function. | ||||
error:144:8 | error:144:8 | ||||
error:150:9 | error:150:9 | ||||
error:164:9 | error:164:9 | ||||
error:171:5 | error:171:5 | ||||
error:178:10 |