1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-25 01:58:49 +02:00
phorge-arcanist/src/lint/linter/__tests__/xhpast/tautological-expressions.lint-test

29 lines
365 B
Text
Raw Normal View History

2011-02-06 22:04:01 +01:00
<?php
if ($x == $x) {
}
if ($x->m(3) < $x->m(3)) {
}
if ($y[2] - $y[2]) {
}
if ($x == $y) {
}
// See xhpast 0.54 -> 0.55.
return $a->sub->value < $b->sub->value;
$skip_cache = true || $some_complicated_expression;
$skip_cache = $a || $b;
$skip_cache = false && something();
$skip_cache = f();
2011-02-06 22:04:01 +01:00
~~~~~~~~~~
error:3:5
error:6:5
error:9:5
error:18:15
error:20:15