1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-01-22 12:41:18 +01:00
phorge-arcanist/src
Joshua Spence f00d4219dd Add a linter rule for incorrect use of parent scope
Summary:
The following code is invalid:

```
final class MyClass {
  public function __construct() {
    parent::__construct(null);
  }
}

$x = new MyClass();
```

Running the above code will produce a fatal error:

```
PHP Fatal error:  Cannot access parent:: when current class scope has no parent
```

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12420
2015-05-14 18:05:14 +10:00
..
__tests__ Use PhutilLibraryTestCase 2015-01-07 07:37:59 +11:00
configuration pht all the things 2015-05-13 21:00:53 +10:00
difference pht all the things 2015-05-13 21:00:53 +10:00
differential pht all the things 2015-05-13 21:00:53 +10:00
docs/book Generate a documentation book for Arcanist 2014-03-05 13:00:40 -08:00
events/constant Remove @group annotations 2014-07-09 09:12:13 +10:00
exception pht all the things 2015-05-13 21:00:53 +10:00
extensions Changes to Arcanist for libphutil "extensions/" 2013-04-22 14:38:49 -07:00
hgdaemon pht all the things 2015-05-13 21:00:53 +10:00
infrastructure/testing Delete license headers from files 2012-11-05 11:16:24 -08:00
internationalization Prompt users to ignore or abort on untracked files 2015-04-02 13:40:14 -07:00
lint Add a linter rule for incorrect use of parent scope 2015-05-14 18:05:14 +10:00
parser pht all the things 2015-05-13 21:00:53 +10:00
repository pht all the things 2015-05-13 21:00:53 +10:00
unit pht all the things 2015-05-13 21:00:53 +10:00
workflow pht all the things 2015-05-13 21:00:53 +10:00
workingcopyidentity pht all the things 2015-05-13 21:00:53 +10:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:24 -08:00
__phutil_library_map__.php Modernize ArcanistPylintLinter 2015-05-14 17:58:55 +10:00