Add phan configuration

Change-Id: Ie8aee5326c4217e151dee816bc5a3d6b71bf6aa2
This commit is contained in:
Kunal Mehta 2018-02-24 13:33:36 -08:00
parent 3297749b56
commit e9208739b6
3 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@
node_modules/
vendor/
composer.lock
tests/phan/issues

View file

@ -17,7 +17,8 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/mediawiki-codesniffer": "16.0.0",
"mediawiki/minus-x": "0.3.1"
"mediawiki/minus-x": "0.3.1",
"mediawiki/mediawiki-phan-config": "0.1.0"
},
"scripts": {
"fix": [

12
tests/phan/config.php Normal file
View file

@ -0,0 +1,12 @@
<?php
$cfg = require __DIR__ . '/../../vendor/mediawiki/mediawiki-phan-config/src/config.php';
$cfg['suppress_issue_types'][] = 'PhanDeprecatedFunction';
// Phan gets confused because DOMNode::setAttribute doesn't
// exist, it's DOMElement::setAttribute, and some functions
// are documented to return DOMNode but they actually return
// DOMElement.
$cfg['suppress_issue_types'][] = 'PhanUndeclaredMethod';
return $cfg;