Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/xhpast/php54-features.lint-test
| <?php | <?php | ||||
| f()[0]; | f()[0]; | ||||
| m()[0]; | $o->m()[0]; | ||||
| // The check above should be this, see T4334. | |||||
| // $o->m()[0]; | |||||
| final class SomeClass extends Phobject { | final class SomeClass extends Phobject { | ||||
| public function someMethod() { | public function someMethod() { | ||||
| return function () { | return function () { | ||||
| $this->someOtherMethod(); | $this->someOtherMethod(); | ||||
| }; | }; | ||||
| } | } | ||||
| public static function someStaticMethod() { | public static function someStaticMethod() { | ||||
| return function () { | return function () { | ||||
| self::someOtherMethod(); | self::someOtherMethod(); | ||||
| }; | }; | ||||
| } | } | ||||
| } | } | ||||
| ~~~~~~~~~~ | ~~~~~~~~~~ | ||||
| error:3:5 | error:3:5 | ||||
| error:4:9 | error:4:9 | ||||
| error:9:13 | error:9:13 | ||||
| error:12:7 | error:12:7 | ||||
| error:18:7 | error:18:7 | ||||
| ~~~~~~~~~~ | ~~~~~~~~~~ | ||||
| ~~~~~~~~~~ | ~~~~~~~~~~ | ||||
| { | { | ||||
| "config": { | "config": { | ||||
| "xhpast.php-version": "5.3.0" | "xhpast.php-version": "5.3.0" | ||||
| } | } | ||||
| } | } | ||||